1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-27 07:37:33 +00:00
Commit Graph

115 Commits

Author SHA1 Message Date
Paul Eggert
bcf244ef9b Merge from origin/emacs-25
2e2a806 Fix copyright years by hand
5badc81 Update copyright year to 2017
2017-01-01 01:10:47 -08:00
Paul Eggert
5badc81c1c Update copyright year to 2017
Run admin/update-copyright.
2016-12-31 19:42:26 -08:00
Alan Third
dfd047666b Fix cursor at bottom left of rectangle (bug#24364)
* lisp/rect.el (rectangle--col-pos): Don't assume point at EOL doesn't
require rectangle--point-crutches to be set.
2016-10-19 12:37:50 +01:00
Alan Third
3b3bc36b0d Fix cursor at bottom left of rectangle (bug#24364)
* lisp/rect.el (rectangle--col-pos): Don't assume point at EOL doesn't
require rectangle--point-crutches to be set.
2016-09-07 22:29:14 +01:00
Paul Eggert
0274862f39 Merge from origin/emacs-25
d08afa1 * etc/AUTHORS: Update the AUTHORS file
2668500 ;; * ChangeLog.2: ChangeLog update.
7acfaea ; ChangeLog fixes
97d28b4 * admin/authors.el (authors-valid-file-names): Addition.
9ab52f6 * admin/authors.el: Additions.
0e646c7 Warn about Cairo-related problems
bc4c07f Don't let completion break `declare' handling
66f95e0 Adjust match data before calling after-change-funs
52cf0d5 Do not show string-rectangle preview if minibuffer is empty
6a3d031 * etc/PROBLEMS: Add entry about selection problems under Plas...

# Conflicts:
#	ChangeLog.2
#	src/lisp.h
2016-08-05 14:10:30 -07:00
Paul Eggert
a855bf48d4 Merge from origin/emacs-25
9a41cd1 ; Fix typo
9356fe2 Expand FIXME near definition of fboundp
219b39f kill-rectangle should mention killed-rectangle
59fa4c3 Avoid assertion violations in nhexl-mode
2016-08-05 14:09:09 -07:00
Mark Oteiza
52cf0d5d98 Do not show string-rectangle preview if minibuffer is empty
* lisp/rect.el (rectangle--string-preview): Remove condition that sets
preview string to the default replacement string.
2016-07-21 16:54:03 -04:00
Mark Oteiza
9a41cd1215 ; Fix typo
Thanks to Robert Weiner.
2016-07-20 18:46:15 -04:00
Noam Postavsky
219b39f521 kill-rectangle should mention killed-rectangle
* lisp/rect.el (kill-rectangle): Mention `killed-rectangle' in docstring
and warning message, rather than kill ring (Bug#19773).
2016-07-16 21:16:43 -04:00
Paul Eggert
a8da4d033d Merge from origin/emacs-25
71fb0e0 Improve last change to vc-git-mode-line-string
6858e77 Todo mode doc bug fix
e55d0db Fix revision calculation in vc-git-mode-line-string
ca87b34 ; Fix errant revert ccb75d7
40bfebe Add Python 3.5 keyword "await"
fa7886a Add new keywords of Python 3.5
ccb75d7 Partially revert previous change.
8ee168a ; * etc/NEWS: Update entry about color fonts on OS X with a w...
b09ca27 Say why text-quoting-style is not a user option
2016-05-01 18:07:57 -07:00
Lars Ingebrigtsen
71795d4b5f Doc fix
* lisp/rect.el (delete-whitespace-rectangle): Doc fix (bug#18026).

(cherry picked from commit 6baca4911e)
2016-05-01 19:27:10 +02:00
Lars Ingebrigtsen
6baca4911e Doc fix
* lisp/rect.el (delete-whitespace-rectangle): Doc fix (bug#18026).
2016-04-30 00:08:07 +02:00
Lars Ingebrigtsen
8c3245ef01 Make undo' of C-x r t' put point where it should be
* lisp/rect.el (string-rectangle): Make `undo' of a this
command put point back where it was (bug#7522).
2016-04-28 01:15:16 +02:00
Mark Oteiza
ca87b349af ; Fix errant revert ccb75d7
* lisp/rect.el (rectangle--highlight-for-redisplay): Use region face.
2016-04-26 20:09:43 -04:00
Mark Oteiza
ccb75d72bd Partially revert previous change.
This commit partially reverts 0f332848cd.
* lisp/rect.el (rectangle--highlight-for-redisplay): Use region face.
This function is for rectangle-mark-mode, not string-rectangle.
2016-04-26 11:42:53 -04:00
Mark Oteiza
0f332848cd Make use of rectangle-preview custom variable.
lisp/rect.el (rectangle--string-preview): Only create a preview if
rectangle-preview is non-nil (Bug#23248).
2016-04-16 12:05:16 -04:00
Mark Oteiza
aa0d83a727 Make use of rectangle-preview face.
* lisp/rect.el (rectangle--string-preview):
(rectangle--highlight-for-redisplay): Replace 'region with
'rectangle-preview (Bug#23248).
2016-04-16 12:04:52 -04:00
Glenn Morris
9f1786e416 Faces names should not end in "-face".
* lisp/rect.el (rectangle-preview): Rename from rectangle-preview-face.
* lisp/vc/vc-hooks.el (vc-state-base): Rename from vc-state-base-face.
2016-04-08 20:59:21 -04:00
Glenn Morris
e85e0d5951 Add some missing version tags.
* lisp/electric.el (electric-quote-comment)
(electric-quote-string, electric-quote-paragraph):
* lisp/epg-config.el (epg-gpgconf-program):
* lisp/rect.el (rectangle-preview):
* lisp/emacs-lisp/check-declare.el (check-declare-ext-errors):
* lisp/emacs-lisp/package.el (package-selected-packages)
(package-hidden-regexps):
* lisp/erc/erc.el (erc-network-hide-list, erc-channel-hide-list):
* lisp/eshell/em-term.el (eshell-destroy-buffer-when-process-dies):
* lisp/gnus/mml-sec.el (mml1991-signers, mml2015-signers)
(mml-smime-signers, mml1991-encrypt-to-self, mml2015-encrypt-to-self)
(mml-smime-encrypt-to-self, mml2015-sign-with-sender)
(mml-smime-sign-with-sender, mml2015-always-trust)
(mml-secure-fail-when-key-problem, mml-secure-key-preferences):
* lisp/net/browse-url.el (browse-url-conkeror-new-window-is-buffer)
(browse-url-conkeror-arguments):
* lisp/net/newst-reader.el (newsticker-download-logos):
* lisp/progmodes/gud.el (gud-guiler-command-name):
* lisp/progmodes/prog-mode.el (prettify-symbols-unprettify-at-point):
* lisp/progmodes/project.el (project-vc):
* lisp/progmodes/python.el (python-indent-guess-indent-offset-verbose)
(python-shell-remote-exec-path, python-shell-first-prompt-hook)
(python-shell-completion-native-disabled-interpreters)
(python-shell-completion-native-enable)
(python-shell-completion-native-output-timeout)
(python-shell-completion-native-try-output-timeout):
* lisp/progmodes/xref.el (xref):
* lisp/term/screen.el (xterm-screen-extra-capabilities):
* lisp/term/xterm.el (xterm-max-cut-length):
Add missing version tags.
2016-01-12 20:06:49 -05:00
Paul Eggert
0e963201d0 Update copyright year to 2016
Run admin/update-copyright.
2016-01-01 01:34:24 -08:00
Juri Linkov
31f6e93933 Support rectangular regions for more commands
* lisp/simple.el (region-extract-function): Handle the arg value ‘bounds’.
(region-insert-function): New function.
(shell-command-on-region): Add arg ‘region-noncontiguous-p’.
If non-nil, operate on multiple chunks.
(region-noncontiguous-p): New function.

* lisp/rect.el: Add function rectangle--insert-region
around region-insert-function.
(extract-rectangle-bounds): New function.
(rectangle--extract-region): Handle the arg value ‘bounds’.
(rectangle--insert-region): New function.

* lisp/emulation/cua-rect.el: Add function cua--insert-rectangle
around region-insert-function.
(cua--extract-rectangle-bounds): New function.
(cua--rectangle-region-extract): Handle the arg value ‘bounds’.

* lisp/replace.el (query-replace, query-replace-regexp): Add arg
‘region-noncontiguous-p’.  Use ‘use-region-p’.
(query-replace-regexp-eval, map-query-replace-regexp)
(replace-string, replace-regexp): Use ‘use-region-p’.
(keep-lines, flush-lines, how-many): Use ‘use-region-p’.
(perform-replace): Add arg ‘region-noncontiguous-p’.
If non-nil, operate on multiple chunks.

* src/casefiddle.c (Fdowncase_region): Add arg ‘region-noncontiguous-p’.
If non-nil, operate on multiple chunks. (Bug#19829)
2015-11-14 01:28:03 +02:00
Johan Bockgård
a77540e774 * lisp/rect.el (delete-whitespace-rectangle-line): Don't cross EOL. 2015-04-12 15:50:02 +02:00
Kelly Dean
56f5ea17f1 rect.el: Suppress superfluous "Mark set" message from push-mark. 2015-02-18 16:36:24 -02:00
Paul Eggert
7e09ef09a4 Update copyright year to 2015
Run admin/update-copyright.
2015-01-01 14:26:41 -08:00
Stefan Monnier
cbdc06f3be Rename 24.5 to 25.1
Except where we expect to backport the corresponding change.
2014-09-29 14:14:08 -04:00
Paul Eggert
0f2ed59206 Spelling fixes.
* lisp/ses.el (ses-file-format-extend-parameter-list): Rename from
ses-file-format-extend-paramter-list.  All uses changed.
* lisp/gnus-cloud.el (gnus-cloud-parse-version-1): Fix misspelling
of ":delete".
2014-09-11 12:44:25 -07:00
Paul Eggert
44a651f0f2 * rect.el (rectangle--default-line-number-format): Rename
from misspelled rectange--default-line-number-format (Bug#18045).
All uses changed.
2014-08-03 23:27:14 -07:00
Stefan Monnier
31ca1841d2 * lisp/rect.el (rectangle--string-preview): Don't assume there
a non-nil default.

Fixes: debbugs:17984
2014-07-18 21:43:29 -04:00
Stefan Monnier
388b22deb4 * lisp/rect.el (apply-on-rectangle): Check forward-line really moved to the
next line.
2014-07-08 22:20:21 -04:00
Stefan Monnier
9362232cef * lisp/rect.el (rectangle--highlight-for-redisplay): Don't pass `orig' with
different calling convention to rectangle--unhighlight-for-redisplay.
2014-07-03 18:22:42 -04:00
Stefan Monnier
5139e960b9 * lisp/rect.el (rectangle-preview): New custom.
(rectangle): New group.
(rectangle--pos-cols): Add `window' argument.
(rectangle--string-preview-state, rectangle--string-preview-window):
New vars.
(rectangle--string-flush-preview, rectangle--string-erase-preview)
(rectangle--space-to, rectangle--string-preview): New functions.
(string-rectangle): Use them.
(rectangle--inhibit-region-highlight): New var.
(rectangle--highlight-for-redisplay): Obey it.  Make sure
`apply-on-region' uses the point-crutches of the right window.
Use :align-to rather than multiple spaces.
2014-06-17 15:33:58 -04:00
Stefan Monnier
7e74ad0238 * lisp/rect.el: Make it possible to move bounds past EOL or into TABs.
(operate-on-rectangle): Use apply-on-rectangle.
(rectangle--mark-crutches): New var.
(rectangle--pos-cols, rectangle--col-pos, rectangle--point-col)
(rectangle--crutches, rectangle--reset-crutches): New functions.
(apply-on-rectangle): Obey crutches.  Avoid setq.
Fix missing final iteration if end is at EOB&BOL.
(rectangle-mark-mode-map): Add remap bindings for
exchange-point-and-mark and char/line movements.
(rectangle--*-char): New function.
(rectangle-exchange-point-and-mark, rectangle-right-char)
(rectangle-left-char, rectangle-forward-char)
(rectangle-backward-char, rectangle-next-line)
(rectangle-previous-line): New commands.
(rectangle--place-cursor): New function.
(rectangle--highlight-for-redisplay): Use it.  Use apply-on-rectangle.
2014-06-11 17:51:44 -04:00
Bastien Guerry
d791cc3bc2 Partially fix Bug#16403.
* rect.el (rectangle-mark-mode): When the region is not active,
display a message saying that the mark as been set and that
rectangle mode is in use.
(rectangle--highlight-for-redisplay): Only put an overlay with a
visible vertical bar when (display-graphic-p) is non-nil.
This partially fixes Bug#16403.
2014-01-13 11:55:22 +01:00
Paul Eggert
ba3189039a Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Stefan Monnier
2013a2f955 * lisp/emulation/cua-rect.el (cua-rectangle-mark-mode): New minor mode.
(cua--deactivate-rectangle): Don't deactivate the mark.
(cua-set-rectangle-mark): Don't set mark-active since
cua--activate-rectangle already does it for us.
(cua--rectangle-highlight-for-redisplay): Unhighlight a previous
non-rectangular region.

* lisp/emulation/cua-base.el (cua-repeat-replace-region):
Use with-current-buffer.

* lisp/net/gnutls.el: Use cl-lib.
(gnutls-negotiate): `mapcan' -> cl-mapcan.
2013-12-15 21:24:08 -05:00
Stefan Monnier
02033d491f * lisp/rect.el (rectangle-mark-mode): Activate mark even if
transient-mark-mode is off.
(rectangle--highlight-for-redisplay): Fix boundary condition when point
is > mark and at bolp.

Fixes: debbugs:16066
2013-12-08 02:32:01 -05:00
Stefan Monnier
7818df11b8 * lisp/bindings.el (ctl-x-map): Bind C-x SPC to rectangle-mark-mode.
* src/keyboard.c (command_loop_1): Use region-extract-function.
* src/insdel.c (Qregion_extract_function): Not static any more (can we
stop pretending that these vars can benefit from being marked static?).
2013-11-11 00:18:53 -05:00
Stefan Monnier
a0d5f7a4a3 * lisp/rect.el (rectangle--highlight-for-redisplay):
* lisp/emacs-lisp/smie.el (smie--next-indent-change):
Use buffer-chars-modified-tick.
2013-11-04 15:45:36 -05:00
Stefan Monnier
4aca7145ff * lisp/rect.el (rectangle-mark-mode): Rename from rectangle-mark.
Make it into a proper minor mode.
(rectangle--region): (implicitly) rename to rectangle-mark-mode.
(rectangle-mark-mode-map): New keymap.
(rectangle--highlight-for-redisplay): Fix some corner cases.

Fixes: debbugs:15796
2013-11-03 22:06:54 -05:00
Stefan Monnier
3472b6c682 Add pre-redisplay-function and rectangular region
* lisp/rect.el: Use lexical-binding.  Add new rectangular region support.
(rectangle-mark): New command.
(rectangle--region): New var.
(deactivate-mark-hook): Reset rectangle--region.
(rectangle--extract-region, rectangle--insert-for-yank)
(rectangle--highlight-for-redisplay)
(rectangle--unhighlight-for-redisplay): New functions.
(region-extract-function, redisplay-unhighlight-region-function)
(redisplay-highlight-region-function): Use them to handle
rectangular region.
* lisp/simple.el (region-extract-function): New var.
(delete-backward-char, delete-forward-char, deactivate-mark): Use it.
(kill-new, kill-append): Remove obsolete `yank-handler' argument.
(kill-region): Replace obsolete `yank-handler' arg with `region'.
(copy-region-as-kill, kill-ring-save): Add `region' argument.
(redisplay-unhighlight-region-function)
(redisplay-highlight-region-function): New vars.
(redisplay--update-region-highlight): New function.
(pre-redisplay-function): Use it.
(exchange-point-and-mark): Don't deactivate the mark before
reactivate-it anyway.
* lisp/comint.el (comint-kill-region): Remove yank-handler argument.
* lisp/delsel.el (delete-backward-char, backward-delete-char-untabify)
(delete-char): Remove property, since it's now part of their
default behavior.
(self-insert-iso): Remove property since this command doesn't exist.

* src/xdisp.c (prepare_menu_bars): Call Vpre_redisplay_function.
(syms_of_xdisp): Declare pre-redisplay-function.
(markpos_of_region): Remove function.
(init_iterator, compute_stop_pos, handle_face_prop)
(face_before_or_after_it_pos, reseat_to_string)
(get_next_display_element, window_buffer_changed)
(redisplay_internal, try_cursor_movement, redisplay_window)
(try_window_reusing_current_matrix, try_window_id, display_line)
(note_mode_line_or_margin_highlight, note_mouse_highlight)
(display_string, mouse_face_from_buffer_pos): Remove region handling.
* src/window.h (struct window): Remove field `region_showing'.
* src/dispextern.h (struct it): Remove region_beg/end_charpos.
(face_at_buffer_position, face_for_overlay_string)
(face_at_string_position): Update prototypes.
* src/xfaces.c (face_at_buffer_position, face_for_overlay_string)
(face_at_string_position): Remove `region_beg' and `region_end' args.
* src/fontset.c (Finternal_char_font):
* src/font.c (font_at, font_range): Adjust calls accordingly.
* src/insdel.c (Qregion_extract_function): New var.
(syms_of_insdel): Initialize it.
(prepare_to_modify_buffer_1): Use it.
2013-10-29 12:11:50 -04:00
Paul Eggert
ab422c4d68 Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
Chong Yidong
2549c068e1 Deactivate the mark on more copy operations, and indicate the copied region.
* lisp/simple.el (indicate-copied-region): New function.
(kill-ring-save): Split off from here.

* lisp/rect.el (copy-rectangle-as-kill): Call indicate-copied-region.
(kill-rectangle): Set deactivate-mark to t on read-only error.

* lisp/register.el (copy-to-register, copy-rectangle-to-register):
Deactivate the mark, and use indicate-copied-region.
(append-to-register, prepend-to-register): Call

Fixes: debbugs:10056
2012-07-29 12:45:48 +08:00
Reuben Thomas
be755c79bd * rect.el (copy-rectangle-as-kill): New command.
* lisp/rect.el, lisp/register.el: Move bindings to bindings.el.

* lisp/bindings.el: Consolidate ctl-x-r-map bindings.  Bind
copy-rectangle-as-kill to C-x r w.

Fixes: debbugs:739
2012-07-14 10:19:07 +08:00
Glenn Morris
acaf905b11 Add 2012 to FSF copyright years for Emacs files 2012-01-05 01:46:05 -08:00
Lars Magne Ingebrigtsen
7509a87433 Leave point at the end of the rectangle after replacing text
* rect.el (apply-on-rectangle): Return the point after the last
operation.
(string-rectangle): Go to the point after the last operation
(bug#7522).
2011-07-14 17:23:08 +02:00
Juanma Barranquero
06b605171f lisp/*.el: Lexical-binding cleanup. 2011-04-19 15:44:55 +02:00
Glenn Morris
73b0cd5003 Convert consecutive FSF copyright years to ranges. 2011-01-24 20:08:28 -08:00
Glenn Morris
0d9f702fd0 Nuke arch-tags. 2011-01-15 15:16:57 -08:00
Stefan Monnier
77ab81d054 Merge from emacs-23 2011-01-14 12:18:41 -05:00
Glenn Morris
5df4f04cd3 Add 2011 to FSF/AIST copyright years. 2011-01-02 15:50:46 -08:00