From 4033ae9d5104d794dc9957b1df5ec7808a4a4f22 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Mon, 9 Jul 2001 13:06:36 +0000 Subject: (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. --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/advice.el | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8a2c30391e..178dfe8f56 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2001-07-09 Gerd Moellmann + * 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 268fea55b0..c13bff9e7c 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. -- cgit v1.2.3