diff options
author | Glenn Morris <rgm@gnu.org> | 2009-02-17 03:02:25 +0000 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2009-02-17 03:02:25 +0000 |
commit | 4431546e80e1899af671a22fbc23f8ae12b1c2d1 (patch) | |
tree | 856b2723a71b0512be79f538f628a02bba138b16 /lisp/emacs-lisp/copyright.el | |
parent | 1640a85f9c5bc25a42cf88e68e8f7e1dd227cf42 (diff) | |
download | emacs-4431546e80e1899af671a22fbc23f8ae12b1c2d1.tar.gz emacs-4431546e80e1899af671a22fbc23f8ae12b1c2d1.tar.bz2 emacs-4431546e80e1899af671a22fbc23f8ae12b1c2d1.zip |
(copyright-update-year): Don't let y-or-n-p move point. (Bug#2209)
Diffstat (limited to 'lisp/emacs-lisp/copyright.el')
-rw-r--r-- | lisp/emacs-lisp/copyright.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el index 36864e9c49b..04020d652e7 100644 --- a/lisp/emacs-lisp/copyright.el +++ b/lisp/emacs-lisp/copyright.el @@ -157,11 +157,13 @@ When this is `function', only ask when called non-interactively." (unless (string= (buffer-substring (- (match-end 3) 2) (match-end 3)) (substring copyright-current-year -2)) (if (or noquery - (y-or-n-p (if replace - (concat "Replace copyright year(s) by " - copyright-current-year "? ") - (concat "Add " copyright-current-year - " to copyright? ")))) + ;; Fixes some point-moving oddness (bug#2209). + (save-excursion + (y-or-n-p (if replace + (concat "Replace copyright year(s) by " + copyright-current-year "? ") + (concat "Add " copyright-current-year + " to copyright? "))))) (if replace (replace-match copyright-current-year t t nil 3) (let ((size (save-excursion (skip-chars-backward "0-9")))) |