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

124 Commits

Author SHA1 Message Date
Paul Eggert
ba809612c0 Merge from origin/emacs-26
2fcf2df Fix copyright years by hand
26bed8b Update copyright year to 2019
2814292 Fix value of default frame height.  (Bug#33921)
2018-12-31 17:57:29 -08:00
Paul Eggert
26bed8ba10 Update copyright year to 2019
Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
2019-01-01 01:01:13 +00:00
Federico Tedin
8fffac14b1 Subject: (mouse-drag-and-drop-region): Simplify and remove assumptions
* lisp/mouse.el (mouse-drag-and-drop-region): Use insert-for-yank for
insertion, remove rectangular-region-specific variables.
Use text-property-not-all.
* lisp/rect.el (rectangle-dimensions): New function.
(rectangle-position-as-coordinates): Use the usual 1-origin for lines.
2018-10-26 13:16:50 -04:00
Federico Tedin
134ba45bf0 Allow two mouse functions to work with Rectangle Mark mode
* lisp/mouse.el (mouse-save-then-kill): Make
mouse-save-then-kill work with rectangular regions, including
when mouse-drag-copy-region is set to t. (Bug#31240)
(mouse-drag-and-drop-region): Allow dragging and dropping
rectangular regions. (Bug#31240)
* rect.el (rectangle-intersect-p)
(rectangle-position-as-coordinates): New functions.
2018-10-17 08:34:51 +02:00
John Shahid
ee3e432300 Optionally add argument description in minor mode DOC (bug#10754)
Add a paragraph to minor mode's docstring documenting the mode's ARG
usage if the supplied docstring doesn't already contain the word "ARG".

* easy-mmode.el (easy-mmode--arg-docstring): New const.
(easy-mmode--arg-docstring): New function.
(define-minor-mode): Use them.

Remove argument documentation from all minor modes.
2018-07-01 23:34:53 -04:00
Paul Eggert
5c7dd8a783 Update copyright year to 2018
Run admin/update-copyright.
2018-01-01 00:57:59 -08:00
Noam Postavsky
20cc68e871 Document rectangle-preview option more (Bug#27974)
* lisp/rect.el (string-rectangle):
* etc/NEWS.25: Mention `rectangle-preview'.
2017-10-16 20:10:55 -04:00
Paul Eggert
bc511a64f6 Prefer HTTPS to FTP and HTTP in documentation
Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November.  Change these FTP URLs to https://ftp.gnu.org
instead.  Make similar changes for URLs to other organizations moving
away from FTP.  Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.
2017-09-13 15:54:37 -07:00
Eli Zaretskii
3ce07b18f9 Avoid infloop in rect.el
* lisp/rect.el (rectangle--*-char): Avoid inflooping when called
with argument N whose absolute value is greater than 1.  (Bug#25773)
2017-02-18 11:32:45 +02:00
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