aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/emacs-lisp/copyright.el22
2 files changed, 18 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5eb3792ef64..5fb589a73bb 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12010-08-14 Kevin Ryde <user42@zip.com.au>
2
3 * emacs-lisp/copyright.el (copyright-update-year)
4 (copyright-update): Use save-window-excursion (Bug#5394).
5
12010-08-14 Tom Tromey <tromey@redhat.com> 62010-08-14 Tom Tromey <tromey@redhat.com>
2 7
3 * progmodes/etags.el (tags-file-name): Mark safe if stringp 8 * progmodes/etags.el (tags-file-name): Mark safe if stringp
diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el
index 6f7a43af844..43eb61b0bee 100644
--- a/lisp/emacs-lisp/copyright.el
+++ b/lisp/emacs-lisp/copyright.el
@@ -158,13 +158,15 @@ When this is `function', only ask when called non-interactively."
158 (unless (string= (buffer-substring (- (match-end 3) 2) (match-end 3)) 158 (unless (string= (buffer-substring (- (match-end 3) 2) (match-end 3))
159 (substring copyright-current-year -2)) 159 (substring copyright-current-year -2))
160 (if (or noquery 160 (if (or noquery
161 ;; Fixes some point-moving oddness (bug#2209). 161 (save-window-excursion
162 (save-excursion 162 (switch-to-buffer (current-buffer))
163 (y-or-n-p (if replace 163 ;; Fixes some point-moving oddness (bug#2209).
164 (concat "Replace copyright year(s) by " 164 (save-excursion
165 copyright-current-year "? ") 165 (y-or-n-p (if replace
166 (concat "Add " copyright-current-year 166 (concat "Replace copyright year(s) by "
167 " to copyright? "))))) 167 copyright-current-year "? ")
168 (concat "Add " copyright-current-year
169 " to copyright? "))))))
168 (if replace 170 (if replace
169 (replace-match copyright-current-year t t nil 3) 171 (replace-match copyright-current-year t t nil 3)
170 (let ((size (save-excursion (skip-chars-backward "0-9")))) 172 (let ((size (save-excursion (skip-chars-backward "0-9"))))
@@ -224,8 +226,10 @@ version \\([0-9]+\\), or (at"
224 (string-to-number copyright-current-gpl-version)) 226 (string-to-number copyright-current-gpl-version))
225 (or noquery 227 (or noquery
226 (save-match-data 228 (save-match-data
227 (y-or-n-p (format "Replace GPL version by %s? " 229 (save-window-excursion
228 copyright-current-gpl-version)))) 230 (switch-to-buffer (current-buffer))
231 (y-or-n-p (format "Replace GPL version by %s? "
232 copyright-current-gpl-version)))))
229 (progn 233 (progn
230 (if (match-end 2) 234 (if (match-end 2)
231 ;; Esperanto bilingual comment in two-column.el 235 ;; Esperanto bilingual comment in two-column.el