[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Strange problem with emacs-lisp/copyright.el
From: |
Johan Bockgård |
Subject: |
Re: Strange problem with emacs-lisp/copyright.el |
Date: |
Sun, 05 Nov 2017 12:36:09 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Lele Gaifax <address@hidden> writes:
> Hi all,
>
> this is just to properly end the thread [1], and ask whether I should open an
> issue, or add an annotation to the existing (but not exactly the same) issue
> #7179 [2], or what.
>
> Back in April I applied Johan Bockgård's suggestion and since then I haven't
> seen the reported problem again:
I've been intending to check in the fix below. Sorry for not getting
around to it sooner. I don't think we need a new bug report.
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
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 @@ (defun copyright-update-year (replace noquery)
(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] |
- Re: Strange problem with emacs-lisp/copyright.el,
Johan Bockgård <=