diff options
author | Gerd Moellmann <gerd@gnu.org> | 2001-07-09 13:06:36 +0000 |
---|---|---|
committer | Gerd Moellmann <gerd@gnu.org> | 2001-07-09 13:06:36 +0000 |
commit | 4033ae9d5104d794dc9957b1df5ec7808a4a4f22 (patch) | |
tree | 6ca26b9a3f76c7c52fe2521aabfdf29c7f1da801 /lisp/emacs-lisp/advice.el | |
parent | 59c2dcf474bc74a2b9b57e5145b30228173075f1 (diff) | |
download | emacs-4033ae9d5104d794dc9957b1df5ec7808a4a4f22.tar.gz emacs-4033ae9d5104d794dc9957b1df5ec7808a4a4f22.tar.bz2 emacs-4033ae9d5104d794dc9957b1df5ec7808a4a4f22.zip |
(ad-make-advised-definition): If the
original definition has an interactive form, but is Elp
instrumented, use the interactive form of the function called by
elp-wrapper.
Diffstat (limited to 'lisp/emacs-lisp/advice.el')
-rw-r--r-- | lisp/emacs-lisp/advice.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index 268fea55b0c..c13bff9e7cc 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el @@ -3068,11 +3068,15 @@ Example: `(ad-map-arglists '(a &rest args) '(w x y z))' will return (interactive-form (cond (orig-macro-p nil) (advised-interactive-form) - ((ad-interactive-form origdef)) + ((ad-interactive-form origdef) + (if (and (symbolp function) (get function 'elp-info)) + (interactive-form (aref (get function 'elp-info) 2)) + (ad-interactive-form origdef))) ;; Otherwise we must have a subr: make it interactive if ;; we have to and initialize required arguments in case ;; it is called interactively: - (orig-interactive-p (interactive-form origdef)))) + (orig-interactive-p + (interactive-form origdef)))) (orig-form (cond ((or orig-special-form-p orig-macro-p) ;; Special forms and macros will be advised into macros. |