# HG changeset patch # User Stefan Monnier # Date 1185652643 0 # Node ID 5800574abbcbeb7d69da54672c337dabc5e85ff5 # Parent b8ea0870f6debe3c071bdb28faeba100a06a06a8 (ad-interactive-form): Re-introduce. (ad-body-forms, ad-advised-interactive-form): Revert this part of last change. diff -r b8ea0870f6de -r 5800574abbcb lisp/ChangeLog --- a/lisp/ChangeLog Sat Jul 28 18:11:25 2007 +0000 +++ b/lisp/ChangeLog Sat Jul 28 19:57:23 2007 +0000 @@ -1,18 +1,23 @@ +2007-07-28 Stefan Monnier + + * emacs-lisp/advice.el (ad-interactive-form): Re-introduce. + (ad-body-forms, ad-advised-interactive-form): Revert this part of + last change. + 2007-07-28 Masatake YAMATO - * vc.el (vc-dired-mode): Added a menu for VC related - operation. Use backend name as the menu label Suggested by - David Kastrup. + * vc.el (vc-dired-mode): Add a menu for VC related operation. + Use backend name as the menu label Suggested by David Kastrup. 2007-07-28 Alan Mackenzie Fix problem with modes derived from CC Mode: - * progmodes/cc-mode.el (c-make-emacs-variables-local): move this + * progmodes/cc-mode.el (c-make-emacs-variables-local): Move this macro to cc-langs. - (c-init-language-vars-for): remove call to above macro. - * progmodes/cc-langs.el (c-make-emacs-variables-local): macro has + (c-init-language-vars-for): Remove call to above macro. + * progmodes/cc-langs.el (c-make-emacs-variables-local): Macro has been moved to here. - (c-make-init-lang-vars-fun): call c-make-emacs-variables-local. + (c-make-init-lang-vars-fun): Call c-make-emacs-variables-local. 2007-07-28 Eli Zaretskii diff -r b8ea0870f6de -r 5800574abbcb lisp/emacs-lisp/advice.el --- a/lisp/emacs-lisp/advice.el Sat Jul 28 18:11:25 2007 +0000 +++ b/lisp/emacs-lisp/advice.el Sat Jul 28 19:57:23 2007 +0000 @@ -2586,13 +2586,21 @@ (natnump docstring)) docstring))) +(defun ad-interactive-form (definition) + "Return the interactive form of DEFINITION. +Like `interactive-form', but also works on pieces of advice." + (interactive-form + (if (ad-advice-p definition) + (ad-lambda-expression definition) + definition))) + (defun ad-body-forms (definition) "Return the list of body forms of DEFINITION." (cond ((ad-compiled-p definition) nil) ((consp definition) (nthcdr (+ (if (ad-docstring definition) 1 0) - (if (interactive-form definition) 1 0)) + (if (ad-interactive-form definition) 1 0)) (cdr (cdr (ad-lambda-expression definition))))))) ;; Matches the docstring of an advised definition. @@ -3024,7 +3032,7 @@ (ad-get-enabled-advices function 'around) (ad-get-enabled-advices function 'after))) (let ((interactive-form - (interactive-form (ad-advice-definition advice)))) + (ad-interactive-form (ad-advice-definition advice)))) (if interactive-form ;; We found the first one, use it: (ad-do-return interactive-form)))))