[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r110681: * lisp/emacs-lisp/advice.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r110681: * lisp/emacs-lisp/advice.el (ad-assemble-advised-definition): |
Date: |
Fri, 26 Oct 2012 14:01:30 -0400 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 110681
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Fri 2012-10-26 14:01:30 -0400
message:
* lisp/emacs-lisp/advice.el (ad-assemble-advised-definition):
Silence bogus compiler warnings for ad-do-it.
modified:
lisp/ChangeLog
lisp/emacs-lisp/advice.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-10-26 17:20:54 +0000
+++ b/lisp/ChangeLog 2012-10-26 18:01:30 +0000
@@ -1,5 +1,8 @@
2012-10-26 Stefan Monnier <address@hidden>
+ * emacs-lisp/advice.el (ad-assemble-advised-definition):
+ Silence bogus compiler warnings for ad-do-it.
+
* bookmark.el (bookmark-completing-read): Set the completion category
to `bookmark' (bug#11131).
=== modified file 'lisp/emacs-lisp/advice.el'
--- a/lisp/emacs-lisp/advice.el 2012-10-18 15:37:57 +0000
+++ b/lisp/emacs-lisp/advice.el 2012-10-26 18:01:30 +0000
@@ -2897,8 +2897,11 @@
ORIG is a form that calls the body of the original unadvised function,
and BEFORES, AROUNDS and AFTERS are the lists of advices with which ORIG
should be modified. The assembled function will be returned."
-
- (let (before-forms around-form around-form-protected after-forms definition)
+ ;; The ad-do-it call should always have the right number of arguments,
+ ;; but the compiler might signal a bogus warning because it checks the call
+ ;; against the advertised calling convention.
+ (let ((around-form `(setq ad-return-value (with-no-warnings ,orig)))
+ before-forms around-form-protected after-forms definition)
(dolist (advice befores)
(cond ((and (ad-advice-protected advice)
before-forms)
@@ -2911,7 +2914,6 @@
(append before-forms
(ad-body-forms (ad-advice-definition advice)))))))
- (setq around-form `(setq ad-return-value ,orig))
(dolist (advice (reverse arounds))
;; If any of the around advices is protected then we
;; protect the complete around advice onion:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r110681: * lisp/emacs-lisp/advice.el (ad-assemble-advised-definition):,
Stefan Monnier <=