[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fix for bug#29935 copyright-update inserts year at random places
From: |
Eli Zaretskii |
Subject: |
Re: fix for bug#29935 copyright-update inserts year at random places |
Date: |
Tue, 02 Jan 2018 18:03:13 +0200 |
> From: Stephen Leake <address@hidden>
> Date: Mon, 01 Jan 2018 17:29:27 -0600
>
> Ok to commit to emacs-26?
How important is it to have this in Emacs 26?
> + (let ((copyright-end (point)))
> + (setq copyright-current-year (format-time-string "%Y"))
> + (unless (string= (buffer-substring (- (match-end 3) 2) (match-end 3))
> + (substring copyright-current-year -2))
> + (if (or noquery
> + (save-window-excursion
> + ;; Fixes some point-moving oddness (bug#2209, bug#29935).
> + (save-excursion
> + (switch-to-buffer (current-buffer))
> + ;; Ensure the copyright line is displayed.
> + (goto-char copyright-end)
> + (y-or-n-p (if replace
> + (concat "Replace copyright year(s) by "
> + copyright-current-year "? ")
> + (concat "Add " copyright-current-year
> + " to copyright? "))))))
Why does this need to use save-window-excursion? AFAIU, that's the
root cause of the problem, so did you try replacing it with equivalent
code that uses other facilities for the same purpose?
Thanks.
- fix for bug#29935 copyright-update inserts year at random places, Stephen Leake, 2018/01/01
- Re: fix for bug#29935 copyright-update inserts year at random places, Lele Gaifax, 2018/01/02
- Re: fix for bug#29935 copyright-update inserts year at random places,
Eli Zaretskii <=
- Re: fix for bug#29935 copyright-update inserts year at random places, Stephen Leake, 2018/01/03
- Re: fix for bug#29935 copyright-update inserts year at random places, Stefan Monnier, 2018/01/03
- Re: fix for bug#29935 copyright-update inserts year at random places, Stephen Leake, 2018/01/03
- Re: fix for bug#29935 copyright-update inserts year at random places, Stefan Monnier, 2018/01/04
- Re: fix for bug#29935 copyright-update inserts year at random places, Stephen Leake, 2018/01/04
- Re: fix for bug#29935 copyright-update inserts year at random places, Stefan Monnier, 2018/01/04
- Re: fix for bug#29935 copyright-update inserts year at random places, martin rudalics, 2018/01/07
- Re: fix for bug#29935 copyright-update inserts year at random places, Stefan Monnier, 2018/01/07
- Re: fix for bug#29935 copyright-update inserts year at random places, martin rudalics, 2018/01/08
- Re: fix for bug#29935 copyright-update inserts year at random places, Stefan Monnier, 2018/01/08