diff options
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b36be6f3a09..e41e948ef29 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-03-15 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * emacs-lisp/bytecomp.el (byte-compile-save-excursion): Change the | ||
| 4 | warning message. | ||
| 5 | |||
| 1 | 2011-03-14 Michael Albinus <michael.albinus@gmx.de> | 6 | 2011-03-14 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 7 | ||
| 3 | * shell.el (shell): When called interactively, offer to change the | 8 | * shell.el (shell): When called interactively, offer to change the |
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." | |||
| 3776 | (defun byte-compile-save-excursion (form) | 3776 | (defun byte-compile-save-excursion (form) |
| 3777 | (if (and (eq 'set-buffer (car-safe (car-safe (cdr form)))) | 3777 | (if (and (eq 'set-buffer (car-safe (car-safe (cdr form)))) |
| 3778 | (byte-compile-warning-enabled-p 'suspicious)) | 3778 | (byte-compile-warning-enabled-p 'suspicious)) |
| 3779 | (byte-compile-warn "`save-excursion' defeated by `set-buffer'")) | 3779 | (byte-compile-warn |
| 3780 | "Use `with-current-buffer' rather than save-excursion+set-buffer")) | ||
| 3780 | (byte-compile-out 'byte-save-excursion 0) | 3781 | (byte-compile-out 'byte-save-excursion 0) |
| 3781 | (byte-compile-body-do-effect (cdr form)) | 3782 | (byte-compile-body-do-effect (cdr form)) |
| 3782 | (byte-compile-out 'byte-unbind 1)) | 3783 | (byte-compile-out 'byte-unbind 1)) |