summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2001-07-09 13:06:36 +0000
committerGerd Moellmann <gerd@gnu.org>2001-07-09 13:06:36 +0000
commit4033ae9d5104d794dc9957b1df5ec7808a4a4f22 (patch)
tree6ca26b9a3f76c7c52fe2521aabfdf29c7f1da801
parent59c2dcf474bc74a2b9b57e5145b30228173075f1 (diff)
downloademacs-4033ae9d5104d794dc9957b1df5ec7808a4a4f22.tar.gz
(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.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/emacs-lisp/advice.el8
2 files changed, 11 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8a2c30391ee..178dfe8f56d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,10 @@
2001-07-09 Gerd Moellmann <gerd@gnu.org>
+ * emacs-lisp/advice.el (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.
+
* winner.el (winner-equal): Make it a defun. Don't compare Winner
configurations with compare-window-configuration; they aren't
window configurations.
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.