diff options
| -rw-r--r-- | lisp/abbrev.el | 2 | ||||
| -rw-r--r-- | lisp/minibuffer.el | 2 | ||||
| -rw-r--r-- | lisp/simple.el | 3 | ||||
| -rw-r--r-- | lisp/subr.el | 4 |
4 files changed, 8 insertions, 3 deletions
diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 7814ea24b4a..163dc8e5727 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el | |||
| @@ -848,7 +848,7 @@ if expansion occurred, else nil.)" | |||
| 848 | "Default function to use for `abbrev-expand-function'. | 848 | "Default function to use for `abbrev-expand-function'. |
| 849 | This respects the wrapper hook `abbrev-expand-functions'. | 849 | This respects the wrapper hook `abbrev-expand-functions'. |
| 850 | Calls `abbrev-insert' to insert any expansion, and returns what it does." | 850 | Calls `abbrev-insert' to insert any expansion, and returns what it does." |
| 851 | (with-wrapper-hook abbrev-expand-functions () | 851 | (subr--with-wrapper-hook-no-warnings abbrev-expand-functions () |
| 852 | (pcase-let ((`(,sym ,name ,wordstart ,wordend) (abbrev--before-point))) | 852 | (pcase-let ((`(,sym ,name ,wordstart ,wordend) (abbrev--before-point))) |
| 853 | (when sym | 853 | (when sym |
| 854 | (let ((startpos (copy-marker (point) t)) | 854 | (let ((startpos (copy-marker (point) t)) |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 1ee05d32de5..9190c1fb203 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -1970,7 +1970,7 @@ if there was no valid completion, else t." | |||
| 1970 | "Default function to use for `completion-in-region-function'. | 1970 | "Default function to use for `completion-in-region-function'. |
| 1971 | Its arguments and return value are as specified for `completion-in-region'. | 1971 | Its arguments and return value are as specified for `completion-in-region'. |
| 1972 | This respects the wrapper hook `completion-in-region-functions'." | 1972 | This respects the wrapper hook `completion-in-region-functions'." |
| 1973 | (with-wrapper-hook | 1973 | (subr--with-wrapper-hook-no-warnings |
| 1974 | ;; FIXME: Maybe we should use this hook to provide a "display | 1974 | ;; FIXME: Maybe we should use this hook to provide a "display |
| 1975 | ;; completions" operation as well. | 1975 | ;; completions" operation as well. |
| 1976 | completion-in-region-functions (start end collection predicate) | 1976 | completion-in-region-functions (start end collection predicate) |
diff --git a/lisp/simple.el b/lisp/simple.el index e2570625f32..65664c93666 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -4061,7 +4061,8 @@ Its arguments and return value are as specified for `filter-buffer-substring'. | |||
| 4061 | This respects the wrapper hook `filter-buffer-substring-functions', | 4061 | This respects the wrapper hook `filter-buffer-substring-functions', |
| 4062 | and the abnormal hook `buffer-substring-filters'. | 4062 | and the abnormal hook `buffer-substring-filters'. |
| 4063 | No filtering is done unless a hook says to." | 4063 | No filtering is done unless a hook says to." |
| 4064 | (with-wrapper-hook filter-buffer-substring-functions (beg end delete) | 4064 | (subr--with-wrapper-hook-no-warnings |
| 4065 | filter-buffer-substring-functions (beg end delete) | ||
| 4065 | (cond | 4066 | (cond |
| 4066 | ((or delete buffer-substring-filters) | 4067 | ((or delete buffer-substring-filters) |
| 4067 | (save-excursion | 4068 | (save-excursion |
diff --git a/lisp/subr.el b/lisp/subr.el index 0fa6404d37d..438f00a6f13 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1546,6 +1546,10 @@ FUN is then called once." | |||
| 1546 | (declare (indent 2) (debug (form sexp body)) | 1546 | (declare (indent 2) (debug (form sexp body)) |
| 1547 | (obsolete "use a <foo>-function variable modified by `add-function'." | 1547 | (obsolete "use a <foo>-function variable modified by `add-function'." |
| 1548 | "24.4")) | 1548 | "24.4")) |
| 1549 | `(subr--with-wrapper-hook-no-warnings ,hook ,args ,@body)) | ||
| 1550 | |||
| 1551 | (defmacro subr--with-wrapper-hook-no-warnings (hook args &rest body) | ||
| 1552 | "Like (with-wrapper-hook HOOK ARGS BODY), but without warnings." | ||
| 1549 | ;; We need those two gensyms because CL's lexical scoping is not available | 1553 | ;; We need those two gensyms because CL's lexical scoping is not available |
| 1550 | ;; for function arguments :-( | 1554 | ;; for function arguments :-( |
| 1551 | (let ((funs (make-symbol "funs")) | 1555 | (let ((funs (make-symbol "funs")) |