summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/abbrev.el9
-rw-r--r--lisp/frame.el12
-rw-r--r--lisp/minibuffer.el6
-rw-r--r--lisp/simple.el6
4 files changed, 23 insertions, 10 deletions
diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index 163dc8e5727..b6d202c1807 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -837,16 +837,17 @@ Takes no argument and should return the abbrev symbol if expansion took place.")
"Expand the abbrev before point, if there is an abbrev there.
Effective when explicitly called even when `abbrev-mode' is nil.
Before doing anything else, runs `pre-abbrev-expand-hook'.
-Calls `abbrev-expand-function' with no argument to do the work,
-and returns whatever it does. (This should be the abbrev symbol
-if expansion occurred, else nil.)"
+Calls the value of `abbrev-expand-function' with no argument to do
+the work, and returns whatever it does. (That return value should
+be the abbrev symbol if expansion occurred, else nil.)"
(interactive)
(run-hooks 'pre-abbrev-expand-hook)
(funcall abbrev-expand-function))
(defun abbrev--default-expand ()
"Default function to use for `abbrev-expand-function'.
-This respects the wrapper hook `abbrev-expand-functions'.
+This also respects the obsolete wrapper hook `abbrev-expand-functions'.
+\(See `with-wrapper-hook' for details about wrapper hooks.)
Calls `abbrev-insert' to insert any expansion, and returns what it does."
(subr--with-wrapper-hook-no-warnings abbrev-expand-functions ()
(pcase-let ((`(,sym ,name ,wordstart ,wordend) (abbrev--before-point)))
diff --git a/lisp/frame.el b/lisp/frame.el
index cfd40bf22fc..b13621a5c50 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -2114,7 +2114,11 @@ This is done when a frame gets focus. Blink timers may be stopped by
(not blink-cursor-idle-timer))
(remove-hook 'post-command-hook 'blink-cursor-check)
(setq blink-cursor-idle-timer
- (run-with-idle-timer blink-cursor-delay
+ ;; The 0.2 sec limitation from below is to avoid erratic
+ ;; behavior (or downright failure to display the cursor
+ ;; during command execution) if they set blink-cursor-delay
+ ;; to a very small or even zero value.
+ (run-with-idle-timer (max 0.2 blink-cursor-delay)
blink-cursor-delay
'blink-cursor-start))))
@@ -2148,7 +2152,11 @@ terminals, cursor blinking is controlled by the terminal."
(add-hook 'focus-in-hook #'blink-cursor-check)
(add-hook 'focus-out-hook #'blink-cursor-suspend)
(setq blink-cursor-idle-timer
- (run-with-idle-timer blink-cursor-delay
+ ;; The 0.2 sec limitation from below is to avoid erratic
+ ;; behavior (or downright failure to display the cursor
+ ;; during command execution) if they set blink-cursor-delay
+ ;; to a very small or even zero value.
+ (run-with-idle-timer (max 0.2 blink-cursor-delay)
blink-cursor-delay
#'blink-cursor-start))))
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 9190c1fb203..3d63ca8bd5f 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -1925,7 +1925,8 @@ variables.")
(exit-minibuffer))
(defvar completion-in-region-functions nil
- "Wrapper hook around `completion--in-region'.")
+ "Wrapper hook around `completion--in-region'.
+\(See `with-wrapper-hook' for details about wrapper hooks.)")
(make-obsolete-variable 'completion-in-region-functions
'completion-in-region-function "24.4")
@@ -1969,7 +1970,8 @@ if there was no valid completion, else t."
(defun completion--in-region (start end collection &optional predicate)
"Default function to use for `completion-in-region-function'.
Its arguments and return value are as specified for `completion-in-region'.
-This respects the wrapper hook `completion-in-region-functions'."
+Also respects the obsolete wrapper hook `completion-in-region-functions'.
+\(See `with-wrapper-hook' for details about wrapper hooks.)"
(subr--with-wrapper-hook-no-warnings
;; FIXME: Maybe we should use this hook to provide a "display
;; completions" operation as well.
diff --git a/lisp/simple.el b/lisp/simple.el
index 7e68baa02f8..dd253aec7d5 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4121,7 +4121,8 @@ These commands include \\[set-mark-command] and \\[start-kbd-macro]."
(defvar filter-buffer-substring-functions nil
- "This variable is a wrapper hook around `buffer-substring--filter'.")
+ "This variable is a wrapper hook around `buffer-substring--filter'.
+\(See `with-wrapper-hook' for details about wrapper hooks.)")
(make-obsolete-variable 'filter-buffer-substring-functions
'filter-buffer-substring-function "24.4")
@@ -4162,7 +4163,8 @@ that are special to a buffer, and should not be copied into other buffers."
(defun buffer-substring--filter (beg end &optional delete)
"Default function to use for `filter-buffer-substring-function'.
Its arguments and return value are as specified for `filter-buffer-substring'.
-This respects the wrapper hook `filter-buffer-substring-functions',
+Also respects the obsolete wrapper hook `filter-buffer-substring-functions'
+\(see `with-wrapper-hook' for details about wrapper hooks),
and the abnormal hook `buffer-substring-filters'.
No filtering is done unless a hook says to."
(subr--with-wrapper-hook-no-warnings