aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThien-Thi Nguyen2007-08-17 22:04:18 +0000
committerThien-Thi Nguyen2007-08-17 22:04:18 +0000
commit578bbaf55b6a34022dd4c8ce3f2eedc96f4fb08a (patch)
treeb17bed4316c185d2c8449fe3a0599f52bc309d6e
parent91db3c234fce84a34f32c845d91c5afae7445313 (diff)
downloademacs-578bbaf55b6a34022dd4c8ce3f2eedc96f4fb08a.tar.gz
emacs-578bbaf55b6a34022dd4c8ce3f2eedc96f4fb08a.zip
(copyright-update-year, copyright-update)
(copyright-fix-years): Fix bug: Handle nil copyright-limit.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/emacs-lisp/copyright.el15
2 files changed, 17 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 69d753121ea..6c64d493124 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12007-08-17 Kimit Yada <kimitto@gmail.com> (tiny change)
2
3 * emacs-lisp/copyright.el (copyright-update-year, copyright-update)
4 (copyright-fix-years): Fix bug: Handle nil copyright-limit.
5
12007-08-17 Bob Rogers <rogers-emacs@rgrjr.dyndns.org> (tiny change) 62007-08-17 Bob Rogers <rogers-emacs@rgrjr.dyndns.org> (tiny change)
2 7
3 * progmode/cperl-mode.el (cperl-look-at-leading-count) 8 * progmode/cperl-mode.el (cperl-look-at-leading-count)
diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el
index ed1d01023fb..d3f0056c413 100644
--- a/lisp/emacs-lisp/copyright.el
+++ b/lisp/emacs-lisp/copyright.el
@@ -84,7 +84,10 @@ When this is `function', only ask when called non-interactively."
84 84
85(defun copyright-update-year (replace noquery) 85(defun copyright-update-year (replace noquery)
86 (when (re-search-forward copyright-regexp 86 (when (re-search-forward copyright-regexp
87 (if copyright-limit (+ (point) copyright-limit)) t) 87 (if copyright-limit
88 (+ (point) copyright-limit)
89 t)
90 t)
88 ;; If the years are continued onto multiple lined 91 ;; If the years are continued onto multiple lined
89 ;; that are marked as comments, skip to the end of the years anyway. 92 ;; that are marked as comments, skip to the end of the years anyway.
90 (while (save-excursion 93 (while (save-excursion
@@ -164,7 +167,10 @@ interactively."
164 "\\(the Free Software Foundation;\ 167 "\\(the Free Software Foundation;\
165 either \\|; a\\^u eldono \\([0-9]+\\)a, ? a\\^u (la\\^u via \\)\ 168 either \\|; a\\^u eldono \\([0-9]+\\)a, ? a\\^u (la\\^u via \\)\
166version \\([0-9]+\\), or (at" 169version \\([0-9]+\\), or (at"
167 (if copyright-limit (+ (point) copyright-limit)) t) 170 (if copyright-limit
171 (+ (point) copyright-limit)
172 t)
173 t)
168 (not (string= (match-string 3) copyright-current-gpl-version)) 174 (not (string= (match-string 3) copyright-current-gpl-version))
169 (or noquery 175 (or noquery
170 (y-or-n-p (concat "Replace GPL version by " 176 (y-or-n-p (concat "Replace GPL version by "
@@ -187,7 +193,10 @@ Uses heuristic: year >= 50 means 19xx, < 50 means 20xx."
187 (widen) 193 (widen)
188 (goto-char (point-min)) 194 (goto-char (point-min))
189 (if (re-search-forward copyright-regexp 195 (if (re-search-forward copyright-regexp
190 (if copyright-limit (+ (point) copyright-limit)) t) 196 (if copyright-limit
197 (+ (point) copyright-limit)
198 t)
199 t)
191 (let ((s (match-beginning 2)) 200 (let ((s (match-beginning 2))
192 (e (copy-marker (1+ (match-end 2)))) 201 (e (copy-marker (1+ (match-end 2))))
193 (p (make-marker)) 202 (p (make-marker))