1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-02 08:22:22 +00:00
Commit Graph

103 Commits

Author SHA1 Message Date
Stefan Kangas
d46e94f23f Merge from origin/emacs-28
1b8719835a Update to Org 9.5.4
92c5faafd7 Clarify documentation of 'string-to-unibyte'
2848512654 ; * lisp/files.el (find-file): Avoid too short lines in do...
672f9f787f Improve keystrokes in doc strings in some find-file functions
ef5651cc77 Fix segfaults when starting on 80x26 TTY frames
bfa647972f ; Fix doc string of 'delete-selection-repeat-replace-region'
a95d46e00f Make it explicit that a couple of _s in lispref are unders...
5c74c25123 Remove from FAQ the MS-Windows info about BDF fonts
edb48646f2 Fix Display Property manual example
2022-06-05 06:30:25 +02:00
Eli Zaretskii
bfa647972f ; Fix doc string of 'delete-selection-repeat-replace-region'
* lisp/delsel.el (delete-selection-repeat-replace-region): Doc
fix.  (Bug#55755)
2022-06-01 22:30:59 +03:00
Visuwesh
db214ae66c delete-selection-mode: Add user option to delete temporary regions only
* lisp/delsel.el (delete-selection-temporary-region): Add new
user option.
(delete-selection-pre-hook): Respect it.
* doc/emacs/mark.texi (Using Region): Document the new user option.
* etc/NEWS: Announce the new user option. (bug#55692)
2022-06-01 19:02:37 +03:00
Eli Zaretskii
19dcb237b5 ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
Miha Rihtaršič
b4f3e6caba Use `abort-minibuffers' in delsel
* lisp/delsel.el (minibuffer-keyboard-quit): Use
`abort-minibuffers' (bug#49821).

Previously, C-g was bound to abort-recursive-edit, now it is bound to
abort-minibuffers.  However, after requiring delsel, it gets bound to
minibuffer-keyboard-quit, which still uses abort-recursive-edit.  Use
the new function instead.
2021-08-04 09:15:25 +02:00
Jim Porter
75b68c3227 Improve to selsel doc strings
* lisp/delsel.el (delete-active-region): Document interactive behavior.
* lisp/delsel.el (delete-selection-repeat-replace-region):
Use "\\[universal-argument]" instead of literal "C-u" in docstring.
2021-06-19 14:28:06 +02:00
Jim Porter
048cc03290 Ensure `<menu-bar> <edit> <clear>' handles rectangular regions
* lisp/delsel.el (delete-active-region): Autoload it and make it interactive.
* lisp/menu-bar.el (menu-bar-edit-menu): Bind "Clear" to
`delete-active-region'.
2021-05-07 21:49:04 -04:00
Paul Eggert
ba05d005e5 Update copyright year to 2021
Run "TZ=UTC0 admin/update-copyright".
2021-01-01 01:13:56 -08:00
Juri Linkov
83b5fcb001 Yank items selected from kill-ring using completion and minibuffer history
* doc/emacs/killing.texi (Earlier Kills): Document standalone M-y.

* doc/emacs/search.texi (Isearch Yank): Explain standalone M-y.

* doc/lispref/text.texi (Yank Commands): Soften the wording of
yank after another yank.

* lisp/delsel.el: Put 'yank' property on yank-pop and yank-from-kill-ring.

* lisp/isearch.el (isearch-yank-pop): Use with-isearch-suspended
and read-from-kill-ring to read a string from the kill-ring and
append it to the search string.

* lisp/simple.el (yank-pop): Call yank-from-kill-ring and
read-from-kill-ring when last-command is not 'yank' instead of
signaling an error.  Remove "*" from interactive spec.  Update docstring.
(read-from-kill-ring): New function.
(yank-from-kill-ring): New command.

https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg00801.html
2020-11-24 21:23:41 +02:00
Lars Ingebrigtsen
9e8fb4a7cb Make delete-selection-helper more resilient
* lisp/delsel.el (delete-selection-helper): Don't bug out on `C-g'
(bug#40357).
2020-10-26 19:15:36 +01:00
Paul Eggert
365e01cc9f Update copyright year to 2020
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2020-01-01 00:59:52 +00:00
Paul Eggert
f744797af1 Go back to "Maintainer: emacs-devel@gnu.org"
Restore lines saying "Maintainer: emacs-devel@gnu.org" when there is
no special maintainer for a file.  Although this wasn't documented
it was common practice and removing the lines didn't have consensus.
2019-05-25 14:25:18 -07:00
Paul Eggert
bef1be8730 Fixes for "Maintainer:" and related lines
Mostly, this just removes "Maintainer: emacs-devel@gnu.org" lines,
which are not that useful.  It also cleans up and regularizes a
few similar lines.
2019-05-19 21:34:27 -07:00
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
Stefan Monnier
75ab41d00d * lisp/delsel.el (minibuffer-keyboard-quit): Remove old redundant code.
The various minibuffer maps all inherit from minibuffer-local-map nowadays,
so a single binding in it is all it takes.
2018-09-16 23:54:04 -04: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
Eli Zaretskii
5b38406491 Fix documentation of delsel and of killing text
* doc/emacs/killing.texi (Appending Kills): Make sure the text
with 2 spaces is not broken between 2 lines.
* doc/emacs/mark.texi (Using Region): Remove the sentence about
delsel mode that describes behavior which exists even without
delsel mode turned on.  Suggested by Petteri Hintsanen
<petterih@iki.fi> in emacs-manual-bugs@gnu.org.

* lisp/delsel.el (delete-selection-mode): Doc fix.
2017-12-27 20:23:10 +02:00
Eli Zaretskii
eea4e9194c Improve documentation of self-insert-uses-region-functions
* lisp/simple.el (self-insert-uses-region-functions): Clarify the
doc string.
* lisp/delsel.el (delete-selection-uses-region-p): Mention
'self-insert-command' in the doc string.  (Bug#29373)

* doc/lispref/text.texi (Commands for Insertion): Mention
'self-insert-uses-region-functions'.
* doc/lispref/modes.texi (Keymaps and Minor Modes): Add a
cross-reference to "Commands for Insertion".
2017-11-24 12:49:04 +02: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
fca62645b6 * lisp/delsel.el (delete-selection-mode): Doc fix. (Bug#25428) 2017-08-26 12:01:24 +03:00
Paul Eggert
5badc81c1c Update copyright year to 2017
Run admin/update-copyright.
2016-12-31 19:42:26 -08:00
Lars Ingebrigtsen
c3557740c9 delsel doc touch ups
* lisp/delsel.el (delete-selection-helper): Use non-nil
instead of t and clarify function return values (bug#18089).

(cherry picked from commit d7a5b5be9a)
2016-05-01 19:27:10 +02:00
Eli Zaretskii
4b37cba3d5 Improve documentation of Delete Selection mode
* lisp/delsel.el (delete-selection-mode)
(delete-selection-helper): Update and expand the doc strings.
(Bug#22296)

* doc/emacs/mark.texi (Using Region): Document the behavior of
delete commands in Delete Selection mode.  (Bug#22296)

* doc/lispref/markers.texi (The Mark): Document how to add the
support for Delete Selection mode to Lisp programs. (Bug#22296)
2016-01-08 14:06:13 +02:00
Paul Eggert
0e963201d0 Update copyright year to 2016
Run admin/update-copyright.
2016-01-01 01:34:24 -08:00
Alan Mackenzie
82a3da21ff Make electric-pair-mode, delete-selection-mode and CC Mode cooperate.
Fixes debbugs#21275.

In Emacs >= 25, let electric-pair-mode take precedence over
delete-selection-mode.
delsel.el (delete-selection-uses-region-p): New function, previously a
lambda expression in a property value for `self-insert-command'.
(top-level) Set the `delete-selection' property of `self-insert-command'
to `delete-selection-uses-region-p'.

progmodes/cc-cmds.el (top-level): Give the `delete-selection' property
for c-electric-\(brace\|paren\) the value `delete-selection-uses-region-p'
when the latter function exists.
2015-08-19 16:47:10 +00:00
Stefan Monnier
ab51cc7dd6 * lisp/delsel.el: Deprecate the `kill' option. Use lexical-binding.
(open-line): Delete like all other commands, instead of killing.
(delete-active-region): Don't define any return any value.
2015-02-05 11:02:10 -05:00
Paul Eggert
7e09ef09a4 Update copyright year to 2015
Run admin/update-copyright.
2015-01-01 14:26:41 -08:00
Kim F. Storm
71477684db Restore cua-delete-copy-to-register-0 and M-v command.
* lisp/delsel.el (delete-selection-save-to-register)
(delsel--replace-text-or-position): New vars.
(delete-active-region): Use them.
(delete-selection-repeat-replace-region): New command, moved from
cua-base.el.
* lisp/emulation/cua-base.el (cua--repeat-replace-text): Remove var.
(cua-repeat-replace-region): Move command to delsel.el.
(cua--init-keymaps): Update binding accordingly.
(cua-mode): Set delete-selection-save-to-register.

Fixes: debbugs:18886
2014-10-30 15:19:49 -04:00
Stefan Monnier
c18add241d * lisp/delsel.el (electric-newline-and-maybe-indent): Mark it as well.
Fixes: debbugs:17737
2014-06-17 09:40:03 -04:00
Stefan Monnier
b28df58ce5 * lisp/delsel.el (delete-char): Restore incorrectly erased property.
Fixes: debbugs:16795
2014-02-18 13:14:36 -05:00
Glenn Morris
34dc21db6e Replace "Maintainer: FSF" with the emacs-devel mailing address 2014-02-09 17:34:22 -08:00
Glenn Morris
a69ecd19fe Delete Selection mode doc updates
* lisp/delsel.el (delete-selection-mode): Doc fix.

* doc/misc/efaq.texi (Replacing highlighted text):
Update delete-selection-mode doc.

* etc/NEWS: Related edit.
2014-01-30 23:28:17 -08:00
Paul Eggert
da5ecfa9b9 Spelling fixes.
* lib-src/Makefile.in (regex.o): Remove reference to no-longer-used macros
CONFIG_BROKETS and INHIBIT_STRING_HEADER.  "BROKETS" was a
misspelling anyway....
* src/nsterm.h (updateCollectionBehavior): Rename from
updateCollectionBehaviour.  All uses changed.
2014-01-04 18:56:08 -08:00
Paul Eggert
ba3189039a Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Stefan Monnier
4b72c12bf8 * lisp/delsel.el (delete-selection-mode): Don't enable transient-mark-mode.
(delete-selection-helper): Make sure yank starts at the top of the
deleted region.
(minibuffer-keyboard-quit): Use region-active-p.
2013-12-11 09:42:34 -05:00
Juri Linkov
bb8097b96b * lisp/delsel.el (delete-active-region): Let-bind `this-command'
to prevent `kill-region' from changing its original value.
(delete-selection-helper): Handle `overwrite-mode' for the type
`kill' exactly the same way as for the type `t'.
(insert-char, quoted-insert, reindent-then-newline-and-indent):
Support more commands.

Fixes: debbugs:13312
2013-12-11 03:11:24 +02:00
Stefan Monnier
00a2b82373 Make registers and delete-selection-mode work on rectangles.
* lisp/register.el (describe-register-1): Don't modify the register's value.
(copy-to-register): Obey region-extract-function.
* lisp/delsel.el (delete-active-region): Obey region-extract-function.
2013-12-07 23:20:50 -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
Stefan Monnier
c77d37e227 Rework the last delsel/electric fix.
* lisp/delsel.el (delete-selection-helper): Use a function instead of a hook.
(delete-selection-pre-hook): Use use-region-p.
(delete-selection-self-insert-function): Remove.
(self-insert-command): Obey self-insert-uses-region-functions.
(self-insert-iso): Revert to previous setting, since we don't actually
know what that command does.
(delete-selection-self-insert-hooks): Remove.
* lisp/electric.el (electric-pair-delete-selection-self-insert-function):
Rename to electric-pair-will-use-region, return a boolean.
(electric-pair-mode): Adjust accordingly.  Don't require delsel.
2012-10-22 08:43:54 -04:00
Simon Law
b1d39ccce4 * lisp/delsel.el (delete-selection-helper): New function, extracted from
delete-selection-pre-hook.
(delete-selection-pre-hook): Use it.
(delete-selection-self-insert-function): New function.
(delete-selection-self-insert-hooks): New hook.
(self-insert-command, self-insert-iso): Use it.
* lisp/electric.el (electric-pair-syntax): New function, extracted from
electric-pair-post-self-insert-function.
(electric-pair-post-self-insert-function): Use it.
(electric-pair-delete-selection-self-insert-function): New function.
(electric-pair-mode): Require delsel and setup
delete-selection-self-insert-hooks.

Fixes: debbugs:11520
2012-10-21 23:15:44 -04:00
Stefan Monnier
5d65606a7e * lisp/delsel.el (delete-selection-pre-hook): Don't propagate the
file-supersession signals.

Fixes: debbugs:12161
2012-08-08 22:18:50 -04:00
Glenn Morris
acaf905b11 Add 2012 to FSF copyright years for Emacs files 2012-01-05 01:46:05 -08:00
Paul Eggert
c80e3b4aed Spelling fixes. 2011-12-04 00:02:42 -08:00
Chong Yidong
06e21633a4 Fix minor mode docstrings for the new meaning of a nil ARG.
* abbrev.el (abbrev-mode):
* allout.el (allout-mode):
* autoinsert.el (auto-insert-mode):
* autoarg.el (autoarg-mode, autoarg-kp-mode):
* autorevert.el (auto-revert-mode, auto-revert-tail-mode)
(global-auto-revert-mode):
* battery.el (display-battery-mode):
* composite.el (global-auto-composition-mode)
(auto-composition-mode):
* delsel.el (delete-selection-mode):
* desktop.el (desktop-save-mode):
* dired-x.el (dired-omit-mode):
* dirtrack.el (dirtrack-mode):
* doc-view.el (doc-view-minor-mode):
* double.el (double-mode):
* electric.el (electric-indent-mode, electric-pair-mode):
* emacs-lock.el (emacs-lock-mode):
* epa-hook.el (auto-encryption-mode):
* follow.el (follow-mode):
* font-core.el (font-lock-mode):
* frame.el (auto-raise-mode, auto-lower-mode, blink-cursor-mode):
* help.el (temp-buffer-resize-mode):
* hilit-chg.el (highlight-changes-mode)
(highlight-changes-visible-mode):
* hi-lock.el (hi-lock-mode):
* hl-line.el (hl-line-mode, global-hl-line-mode):
* icomplete.el (icomplete-mode):
* ido.el (ido-everywhere):
* image-file.el (auto-image-file-mode):
* image-mode.el (image-minor-mode):
* iswitchb.el (iswitchb-mode):
* jka-cmpr-hook.el (auto-compression-mode):
* linum.el (linum-mode):
* longlines.el (longlines-mode):
* master.el (master-mode):
* mb-depth.el (minibuffer-depth-indicate-mode):
* menu-bar.el (menu-bar-mode):
* minibuf-eldef.el (minibuffer-electric-default-mode):
* mouse-sel.el (mouse-sel-mode):
* msb.el (msb-mode):
* mwheel.el (mouse-wheel-mode):
* outline.el (outline-minor-mode):
* paren.el (show-paren-mode):
* recentf.el (recentf-mode):
* reveal.el (reveal-mode, global-reveal-mode):
* rfn-eshadow.el (file-name-shadow-mode):
* ruler-mode.el (ruler-mode):
* savehist.el (savehist-mode):
* scroll-all.el (scroll-all-mode):
* scroll-bar.el (scroll-bar-mode):
* server.el (server-mode):
* shell.el (shell-dirtrack-mode):
* simple.el (auto-fill-mode, transient-mark-mode)
(visual-line-mode, overwrite-mode, binary-overwrite-mode)
(line-number-mode, column-number-mode, size-indication-mode)
(auto-save-mode, normal-erase-is-backspace-mode, visible-mode):
* strokes.el (strokes-mode):
* time.el (display-time-mode):
* t-mouse.el (gpm-mouse-mode):
* tool-bar.el (tool-bar-mode):
* tooltip.el (tooltip-mode):
* type-break.el (type-break-mode-line-message-mode)
(type-break-query-mode):
* view.el (view-mode):
* whitespace.el (whitespace-mode, whitespace-newline-mode)
(global-whitespace-mode, global-whitespace-newline-mode):
* xt-mouse.el (xterm-mouse-mode): Doc fix.

* emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Fix
autogenerated docstring.
2011-10-19 08:54:24 -04: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
Glenn Morris
5df4f04cd3 Add 2011 to FSF/AIST copyright years. 2011-01-02 15:50:46 -08:00