[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 369c67a: copyright.el: Avoid inadvertent point moti
From: |
Johan Bockgard |
Subject: |
[Emacs-diffs] master 369c67a: copyright.el: Avoid inadvertent point motion |
Date: |
Sun, 19 Nov 2017 11:07:38 -0500 (EST) |
branch: master
commit 369c67a6bba8ec36d9b2f29413848f5898a9e1ea
Author: Johan Bockgård <address@hidden>
Commit: Johan Bockgård <address@hidden>
copyright.el: Avoid inadvertent point motion
* lisp/emacs-lisp/copyright.el (copyright-update-year): Enlarge the
scope of save-excursion. Reported in:
https://lists.gnu.org/archive/html/emacs-devel/2017-04/msg00271.html
---
lisp/emacs-lisp/copyright.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el
index 11569e4..25dc77c 100644
--- a/lisp/emacs-lisp/copyright.el
+++ b/lisp/emacs-lisp/copyright.el
@@ -186,9 +186,10 @@ skips to the end of all the years."
(substring copyright-current-year -2))
(if (or noquery
(save-window-excursion
- (switch-to-buffer (current-buffer))
- ;; Fixes some point-moving oddness (bug#2209).
+ ;; switch-to-buffer might move point when
+ ;; switch-to-buffer-preserve-window-point is non-nil.
(save-excursion
+ (switch-to-buffer (current-buffer))
(y-or-n-p (if replace
(concat "Replace copyright year(s) by "
copyright-current-year "? ")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 369c67a: copyright.el: Avoid inadvertent point motion,
Johan Bockgard <=