mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 22:41:06 -08:00
* lisp/subr.el (with-wrapper-hook): Declare obsolete.
* lisp/simple.el (filter-buffer-substring-function): New hook. (filter-buffer-substring): Use it. (filter-buffer-substring-functions): Mark obsolete. * lisp/minibuffer.el (completion-in-region-function): New hook. (completion-in-region): Use it. (completion-in-region-functions): Mark obsolete. * lisp/mail/mailabbrev.el (mail-abbrevs-setup): Use abbrev-expand-function. * lisp/abbrev.el (abbrev-expand-function): New hook. (expand-abbrev): Use it. (abbrev-expand-functions): Mark obsolete. * lisp/emacs-lisp/nadvice.el (advice--where-alist): Add :filter-args and :filter-return. * lisp/org/org-agenda.el (org-agenda-mode): * lisp/org/org-indent.el (org-indent-mode): Use the `local' arg of add-hook/remove-hook.
This commit is contained in:
parent
04754d3612
commit
d36ed1c8e7
11 changed files with 709 additions and 674 deletions
|
|
@ -44,7 +44,9 @@
|
|||
(:after-until "\300\302\002\"\206\013\000\300\301\002\"\207" 4)
|
||||
(:after-while "\300\302\002\"\205\013\000\300\301\002\"\207" 4)
|
||||
(:before-until "\300\301\002\"\206\013\000\300\302\002\"\207" 4)
|
||||
(:before-while "\300\301\002\"\205\013\000\300\302\002\"\207" 4))
|
||||
(:before-while "\300\301\002\"\205\013\000\300\302\002\"\207" 4)
|
||||
(:filter-args "\300\302\301!\"\207" 5)
|
||||
(:filter-return "\301\300\302\"!\207" 5))
|
||||
"List of descriptions of how to add a function.
|
||||
Each element has the form (WHERE BYTECODE STACK) where:
|
||||
WHERE is a keyword indicating where the function is added.
|
||||
|
|
@ -208,7 +210,6 @@ WHERE is a symbol to select an entry in `advice--where-alist'."
|
|||
;;;###autoload
|
||||
(defmacro add-function (where place function &optional props)
|
||||
;; TODO:
|
||||
;; - obsolete with-wrapper-hook (mostly requires buffer-local support).
|
||||
;; - provide some kind of control over ordering. E.g. debug-on-entry, ELP
|
||||
;; and tracing want to stay first.
|
||||
;; - maybe let `where' specify some kind of predicate and use it
|
||||
|
|
@ -231,6 +232,8 @@ call OLDFUN here:
|
|||
`:before-until' (lambda (&rest r) (or (apply FUNCTION r) (apply OLDFUN r)))
|
||||
`:after-while' (lambda (&rest r) (and (apply OLDFUN r) (apply FUNCTION r)))
|
||||
`:after-until' (lambda (&rest r) (or (apply OLDFUN r) (apply FUNCTION r)))
|
||||
`:filter-args' (lambda (&rest r) (apply OLDFUN (funcall FUNCTION r)))
|
||||
`:filter-return'(lambda (&rest r) (funcall FUNCTION (apply OLDFUN r)))
|
||||
If FUNCTION was already added, do nothing.
|
||||
PROPS is an alist of additional properties, among which the following have
|
||||
a special meaning:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue