summaryrefslogtreecommitdiff
path: root/lisp/simple.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el17
1 files changed, 13 insertions, 4 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 41f22b2396d..24ecf6929d9 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -406,9 +406,18 @@ Other major modes are defined by comparison with this one."
(defvar self-insert-uses-region-functions nil
"Special hook to tell if `self-insert-command' will use the region.
It must be called via `run-hook-with-args-until-success' with no arguments.
-Any `post-self-insert-command' which consumes the region should
-register a function on this hook so that things like `delete-selection-mode'
-can refrain from consuming the region.")
+
+If any function on this hook returns a non-nil value, `delete-selection-mode'
+will act on that value (see `delete-selection-helper'), and will
+usually delete the region. If all the functions on this hook return
+nil, it is an indiction that `self-insert-command' needs the region
+untouched by `delete-selection-mode', and will itself do whatever is
+appropriate with the region.
+Any function on `post-self-insert-hook' which act on the region should
+add a function to this hook so that `delete-selection-mode' could
+refrain from deleting the region before `post-self-insert-hook'
+functions are called.
+This hook is run by `delete-selection-uses-region-p', which see.")
(defvar hard-newline (propertize "\n" 'hard t 'rear-nonsticky '(hard))
"Propertized string representing a hard newline character.")
@@ -8816,7 +8825,7 @@ If it does not exist, create and it switch it to `messages-buffer-mode'."
;; rms says this should be done by specifying symbols that define
;; versions together with bad values. This is therefore not as
;; flexible as it could be. See the thread:
-;; https://lists.gnu.org/archive/html/emacs-devel/2007-08/msg00300.html
+;; https://lists.gnu.org/r/emacs-devel/2007-08/msg00300.html
(defconst bad-packages-alist
;; Not sure exactly which semantic versions have problems.
;; Definitely 2.0pre3, probably all 2.0pre's before this.