aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2012-10-26 14:01:30 -0400
committerStefan Monnier2012-10-26 14:01:30 -0400
commit150f809c341e3b711a78daee528ad40f68052ce6 (patch)
tree3be73d5c60e36ac32c661b845ae10fa0dcef64b3
parent372212dff2e3d84c676dc78ff27d7a0b5ec710de (diff)
downloademacs-150f809c341e3b711a78daee528ad40f68052ce6.tar.gz
emacs-150f809c341e3b711a78daee528ad40f68052ce6.zip
* lisp/emacs-lisp/advice.el (ad-assemble-advised-definition):
Silence bogus compiler warnings for ad-do-it.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/emacs-lisp/advice.el8
2 files changed, 8 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c43b0c136e3..7cb9fb0793c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12012-10-26 Stefan Monnier <monnier@iro.umontreal.ca> 12012-10-26 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * emacs-lisp/advice.el (ad-assemble-advised-definition):
4 Silence bogus compiler warnings for ad-do-it.
5
3 * bookmark.el (bookmark-completing-read): Set the completion category 6 * bookmark.el (bookmark-completing-read): Set the completion category
4 to `bookmark' (bug#11131). 7 to `bookmark' (bug#11131).
5 8
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el
index 007871aa3a6..bd85238e23e 100644
--- a/lisp/emacs-lisp/advice.el
+++ b/lisp/emacs-lisp/advice.el
@@ -2897,8 +2897,11 @@ definition, INTERACTIVE if non-nil is the interactive form to be used,
2897ORIG is a form that calls the body of the original unadvised function, 2897ORIG is a form that calls the body of the original unadvised function,
2898and BEFORES, AROUNDS and AFTERS are the lists of advices with which ORIG 2898and BEFORES, AROUNDS and AFTERS are the lists of advices with which ORIG
2899should be modified. The assembled function will be returned." 2899should be modified. The assembled function will be returned."
2900 2900 ;; The ad-do-it call should always have the right number of arguments,
2901 (let (before-forms around-form around-form-protected after-forms definition) 2901 ;; but the compiler might signal a bogus warning because it checks the call
2902 ;; against the advertised calling convention.
2903 (let ((around-form `(setq ad-return-value (with-no-warnings ,orig)))
2904 before-forms around-form-protected after-forms definition)
2902 (dolist (advice befores) 2905 (dolist (advice befores)
2903 (cond ((and (ad-advice-protected advice) 2906 (cond ((and (ad-advice-protected advice)
2904 before-forms) 2907 before-forms)
@@ -2911,7 +2914,6 @@ should be modified. The assembled function will be returned."
2911 (append before-forms 2914 (append before-forms
2912 (ad-body-forms (ad-advice-definition advice))))))) 2915 (ad-body-forms (ad-advice-definition advice)))))))
2913 2916
2914 (setq around-form `(setq ad-return-value ,orig))
2915 (dolist (advice (reverse arounds)) 2917 (dolist (advice (reverse arounds))
2916 ;; If any of the around advices is protected then we 2918 ;; If any of the around advices is protected then we
2917 ;; protect the complete around advice onion: 2919 ;; protect the complete around advice onion: