Mercurial > emacs
changeset 82192:5800574abbcb
(ad-interactive-form): Re-introduce.
(ad-body-forms, ad-advised-interactive-form): Revert this part of last change.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sat, 28 Jul 2007 19:57:23 +0000 |
parents | b8ea0870f6de |
children | 6037be8575c3 |
files | lisp/ChangeLog lisp/emacs-lisp/advice.el |
diffstat | 2 files changed, 22 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- 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 <monnier@iro.umontreal.ca> + + * 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 <jet@gyve.org> - * 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 <acm@muc.de> 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 <eliz@gnu.org>
--- 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)))))