# HG changeset patch # User Thien-Thi Nguyen # Date 1187388188 0 # Node ID b994c6078b259dfebd8338aa0d0623580d5bb391 # Parent 1587dbe7ef95b8c777324b3b4006eae9ec047791 (copyright-update-year, copyright-update) (copyright-fix-years): Fix bug: Handle nil copyright-limit. diff -r 1587dbe7ef95 -r b994c6078b25 lisp/emacs-lisp/copyright.el --- a/lisp/emacs-lisp/copyright.el Fri Aug 17 19:29:52 2007 +0000 +++ b/lisp/emacs-lisp/copyright.el Fri Aug 17 22:03:08 2007 +0000 @@ -84,7 +84,10 @@ (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 @@ "\\(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 @@ (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))