aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog19
-rw-r--r--lisp/emacs-lisp/advice.el12
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 @@
12007-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
12007-07-28 Masatake YAMATO <jet@gyve.org> 72007-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
72007-07-28 Alan Mackenzie <acm@muc.de> 122007-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
172007-07-28 Eli Zaretskii <eliz@gnu.org> 222007-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.
2591Like `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)))))