diff options
| author | Stefan Monnier | 2007-07-28 19:57:23 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-07-28 19:57:23 +0000 |
| commit | 806bc6df0a6730551e9cc55aacc2dfa2b8dd13f1 (patch) | |
| tree | 9ce623ff0edf845dc8049b2864e6c41f58af07fd | |
| parent | 9d2aebf64918002fe3c1ad9ffcdbb69b0844159e (diff) | |
| download | emacs-806bc6df0a6730551e9cc55aacc2dfa2b8dd13f1.tar.gz emacs-806bc6df0a6730551e9cc55aacc2dfa2b8dd13f1.zip | |
(ad-interactive-form): Re-introduce.
(ad-body-forms, ad-advised-interactive-form): Revert this part of last change.
| -rw-r--r-- | lisp/ChangeLog | 19 | ||||
| -rw-r--r-- | lisp/emacs-lisp/advice.el | 12 |
2 files changed, 22 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a9dc3eed6aa..eb4f2448c0e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,18 +1,23 @@ | |||
| 1 | 2007-07-28 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * emacs-lisp/advice.el (ad-interactive-form): Re-introduce. | ||
| 4 | (ad-body-forms, ad-advised-interactive-form): Revert this part of | ||
| 5 | last change. | ||
| 6 | |||
| 1 | 2007-07-28 Masatake YAMATO <jet@gyve.org> | 7 | 2007-07-28 Masatake YAMATO <jet@gyve.org> |
| 2 | 8 | ||
| 3 | * vc.el (vc-dired-mode): Added a menu for VC related | 9 | * vc.el (vc-dired-mode): Add a menu for VC related operation. |
| 4 | operation. Use backend name as the menu label Suggested by | 10 | Use backend name as the menu label Suggested by David Kastrup. |
| 5 | David Kastrup. | ||
| 6 | 11 | ||
| 7 | 2007-07-28 Alan Mackenzie <acm@muc.de> | 12 | 2007-07-28 Alan Mackenzie <acm@muc.de> |
| 8 | 13 | ||
| 9 | Fix problem with modes derived from CC Mode: | 14 | Fix problem with modes derived from CC Mode: |
| 10 | * progmodes/cc-mode.el (c-make-emacs-variables-local): move this | 15 | * progmodes/cc-mode.el (c-make-emacs-variables-local): Move this |
| 11 | macro to cc-langs. | 16 | macro to cc-langs. |
| 12 | (c-init-language-vars-for): remove call to above macro. | 17 | (c-init-language-vars-for): Remove call to above macro. |
| 13 | * progmodes/cc-langs.el (c-make-emacs-variables-local): macro has | 18 | * progmodes/cc-langs.el (c-make-emacs-variables-local): Macro has |
| 14 | been moved to here. | 19 | been moved to here. |
| 15 | (c-make-init-lang-vars-fun): call c-make-emacs-variables-local. | 20 | (c-make-init-lang-vars-fun): Call c-make-emacs-variables-local. |
| 16 | 21 | ||
| 17 | 2007-07-28 Eli Zaretskii <eliz@gnu.org> | 22 | 2007-07-28 Eli Zaretskii <eliz@gnu.org> |
| 18 | 23 | ||
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index c6e80453d72..dbebf314798 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el | |||
| @@ -2586,13 +2586,21 @@ that property, or otherwise use `(&rest ad-subr-args)'." | |||
| 2586 | (natnump docstring)) | 2586 | (natnump docstring)) |
| 2587 | docstring))) | 2587 | docstring))) |
| 2588 | 2588 | ||
| 2589 | (defun ad-interactive-form (definition) | ||
| 2590 | "Return the interactive form of DEFINITION. | ||
| 2591 | Like `interactive-form', but also works on pieces of advice." | ||
| 2592 | (interactive-form | ||
| 2593 | (if (ad-advice-p definition) | ||
| 2594 | (ad-lambda-expression definition) | ||
| 2595 | definition))) | ||
| 2596 | |||
| 2589 | (defun ad-body-forms (definition) | 2597 | (defun ad-body-forms (definition) |
| 2590 | "Return the list of body forms of DEFINITION." | 2598 | "Return the list of body forms of DEFINITION." |
| 2591 | (cond ((ad-compiled-p definition) | 2599 | (cond ((ad-compiled-p definition) |
| 2592 | nil) | 2600 | nil) |
| 2593 | ((consp definition) | 2601 | ((consp definition) |
| 2594 | (nthcdr (+ (if (ad-docstring definition) 1 0) | 2602 | (nthcdr (+ (if (ad-docstring definition) 1 0) |
| 2595 | (if (interactive-form definition) 1 0)) | 2603 | (if (ad-interactive-form definition) 1 0)) |
| 2596 | (cdr (cdr (ad-lambda-expression definition))))))) | 2604 | (cdr (cdr (ad-lambda-expression definition))))))) |
| 2597 | 2605 | ||
| 2598 | ;; Matches the docstring of an advised definition. | 2606 | ;; Matches the docstring of an advised definition. |
| @@ -3024,7 +3032,7 @@ in any of these classes." | |||
| 3024 | (ad-get-enabled-advices function 'around) | 3032 | (ad-get-enabled-advices function 'around) |
| 3025 | (ad-get-enabled-advices function 'after))) | 3033 | (ad-get-enabled-advices function 'after))) |
| 3026 | (let ((interactive-form | 3034 | (let ((interactive-form |
| 3027 | (interactive-form (ad-advice-definition advice)))) | 3035 | (ad-interactive-form (ad-advice-definition advice)))) |
| 3028 | (if interactive-form | 3036 | (if interactive-form |
| 3029 | ;; We found the first one, use it: | 3037 | ;; We found the first one, use it: |
| 3030 | (ad-do-return interactive-form))))) | 3038 | (ad-do-return interactive-form))))) |