Mercurial > emacs
changeset 102066:0fb11e475237
(copyright-update-year): Don't let y-or-n-p move point. (Bug#2209)
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Tue, 17 Feb 2009 03:02:25 +0000 |
parents | 8dfd81b55840 |
children | c1697dc8f121 |
files | lisp/ChangeLog lisp/emacs-lisp/copyright.el |
diffstat | 2 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Tue Feb 17 02:54:14 2009 +0000 +++ b/lisp/ChangeLog Tue Feb 17 03:02:25 2009 +0000 @@ -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
--- a/lisp/emacs-lisp/copyright.el Tue Feb 17 02:54:14 2009 +0000 +++ b/lisp/emacs-lisp/copyright.el Tue Feb 17 03:02:25 2009 +0000 @@ -157,11 +157,13 @@ (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"))))