diff options
author | Thien-Thi Nguyen <ttn@gnuvola.org> | 2007-08-17 22:04:18 +0000 |
---|---|---|
committer | Thien-Thi Nguyen <ttn@gnuvola.org> | 2007-08-17 22:04:18 +0000 |
commit | 578bbaf55b6a34022dd4c8ce3f2eedc96f4fb08a (patch) | |
tree | b17bed4316c185d2c8449fe3a0599f52bc309d6e /lisp/emacs-lisp | |
parent | 91db3c234fce84a34f32c845d91c5afae7445313 (diff) | |
download | emacs-578bbaf55b6a34022dd4c8ce3f2eedc96f4fb08a.tar.gz emacs-578bbaf55b6a34022dd4c8ce3f2eedc96f4fb08a.tar.bz2 emacs-578bbaf55b6a34022dd4c8ce3f2eedc96f4fb08a.zip |
(copyright-update-year, copyright-update)
(copyright-fix-years): Fix bug: Handle nil copyright-limit.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/copyright.el | 15 |
1 files changed, 12 insertions, 3 deletions
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." (defun copyright-update-year (replace noquery) (when (re-search-forward copyright-regexp - (if copyright-limit (+ (point) copyright-limit)) t) + (if copyright-limit + (+ (point) copyright-limit) + t) + t) ;; If the years are continued onto multiple lined ;; that are marked as comments, skip to the end of the years anyway. (while (save-excursion @@ -164,7 +167,10 @@ interactively." "\\(the Free Software Foundation;\ either \\|; a\\^u eldono \\([0-9]+\\)a, ? a\\^u (la\\^u via \\)\ version \\([0-9]+\\), or (at" - (if copyright-limit (+ (point) copyright-limit)) t) + (if copyright-limit + (+ (point) copyright-limit) + t) + t) (not (string= (match-string 3) copyright-current-gpl-version)) (or noquery (y-or-n-p (concat "Replace GPL version by " @@ -187,7 +193,10 @@ Uses heuristic: year >= 50 means 19xx, < 50 means 20xx." (widen) (goto-char (point-min)) (if (re-search-forward copyright-regexp - (if copyright-limit (+ (point) copyright-limit)) t) + (if copyright-limit + (+ (point) copyright-limit) + t) + t) (let ((s (match-beginning 2)) (e (copy-marker (1+ (match-end 2)))) (p (make-marker)) |