summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2013-04-17 20:12:33 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2013-04-17 20:12:33 -0400
commitd36ed1c8e7a88757890edb629b7da73be05a9ae2 (patch)
tree8c607eda3023a41cd0e5d0529e5b7f71a5d78dda /lisp/emacs-lisp
parent04754d3612ea2f09440604c571814e0795511fa3 (diff)
downloademacs-d36ed1c8e7a88757890edb629b7da73be05a9ae2.tar.gz
emacs-d36ed1c8e7a88757890edb629b7da73be05a9ae2.tar.bz2
emacs-d36ed1c8e7a88757890edb629b7da73be05a9ae2.zip
* 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.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/nadvice.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el
index 6c09ddfb8cf..a3dfb0326e6 100644
--- a/lisp/emacs-lisp/nadvice.el
+++ b/lisp/emacs-lisp/nadvice.el
@@ -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: