Commit 4431546e authored by Glenn Morris's avatar Glenn Morris
Browse files

(copyright-update-year): Don't let y-or-n-p move point. (Bug#2209)

parent 1640a85f
2009-02-17 Glenn Morris <rgm@gnu.org> 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. * mail/rmailout.el (rmail-fields-not-to-output): Doc fix.
(rmail-delete-unwanted-fields): Ignore case. Use line-beg-pos. (rmail-delete-unwanted-fields): Ignore case. Use line-beg-pos.
(rmail-output, rmail-output-as-seen): Change the "from-gnus" argument to (rmail-output, rmail-output-as-seen): Change the "from-gnus" argument to
......
...@@ -157,11 +157,13 @@ When this is `function', only ask when called non-interactively." ...@@ -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)) (unless (string= (buffer-substring (- (match-end 3) 2) (match-end 3))
(substring copyright-current-year -2)) (substring copyright-current-year -2))
(if (or noquery (if (or noquery
(y-or-n-p (if replace ;; Fixes some point-moving oddness (bug#2209).
(concat "Replace copyright year(s) by " (save-excursion
copyright-current-year "? ") (y-or-n-p (if replace
(concat "Add " copyright-current-year (concat "Replace copyright year(s) by "
" to copyright? ")))) copyright-current-year "? ")
(concat "Add " copyright-current-year
" to copyright? ")))))
(if replace (if replace
(replace-match copyright-current-year t t nil 3) (replace-match copyright-current-year t t nil 3)
(let ((size (save-excursion (skip-chars-backward "0-9")))) (let ((size (save-excursion (skip-chars-backward "0-9"))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment