* lisp/emacs-lisp/bytecomp.el (byte-compile-save-excursion): Change the
warning message.
This commit is contained in:
parent
c96bbc66c6
commit
0a57d256af
2 changed files with 7 additions and 1 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue