summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/emacs-lisp/copyright.el12
2 files changed, 10 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 362f2237839..77aa43c77af 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
2009-02-17 Glenn Morris <rgm@gnu.org>
+ * emacs-lisp/copyright.el (copyright-update-year): Don't let y-or-n-p
+ move point. (Bug#2209)
+
* mail/rmailout.el (rmail-fields-not-to-output): Doc fix.
(rmail-delete-unwanted-fields): Ignore case. Use line-beg-pos.
(rmail-output, rmail-output-as-seen): Change the "from-gnus" argument to
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"))))