summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2011-03-14 21:12:54 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2011-03-14 21:12:54 -0400
commit0a57d256afbca59f9432c8b7c9f2c58bca8ff562 (patch)
treed5ab2d93224f305589c42b42f3518c10ebeeda56 /lisp/emacs-lisp
parentc96bbc66c6ce2554a0c5336110d5fd9a72ae371a (diff)
downloademacs-0a57d256afbca59f9432c8b7c9f2c58bca8ff562.tar.gz
emacs-0a57d256afbca59f9432c8b7c9f2c58bca8ff562.tar.bz2
emacs-0a57d256afbca59f9432c8b7c9f2c58bca8ff562.zip
* lisp/emacs-lisp/bytecomp.el (byte-compile-save-excursion): Change the
warning message.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/bytecomp.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 5e24b80ac5a..5c845e59c85 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -3776,7 +3776,8 @@ that suppresses all warnings during execution of BODY."
(defun byte-compile-save-excursion (form)
(if (and (eq 'set-buffer (car-safe (car-safe (cdr form))))
(byte-compile-warning-enabled-p 'suspicious))
- (byte-compile-warn "`save-excursion' defeated by `set-buffer'"))
+ (byte-compile-warn
+ "Use `with-current-buffer' rather than save-excursion+set-buffer"))
(byte-compile-out 'byte-save-excursion 0)
(byte-compile-body-do-effect (cdr form))
(byte-compile-out 'byte-unbind 1))