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
This commit is contained in:
parent
f41bcae3e5
commit
369c67a6bb
1 changed files with 3 additions and 2 deletions
|
|
@ -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 "? ")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue