From: Gerd Moellmann Date: Mon, 9 Jul 2001 13:06:36 +0000 (+0000) Subject: (ad-make-advised-definition): If the X-Git-Tag: emacs-pretest-21.0.104~40 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4033ae9d5104d794dc9957b1df5ec7808a4a4f22;p=emacs.git (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. --- 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 + * 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.