comparison lisp/emacs-lisp/copyright.el @ 82445:8bed2c8a10f1

(copyright-update-year): Fix bug: Handle nil copyright-limit.
author Thien-Thi Nguyen <ttn@gnuvola.org>
date Fri, 17 Aug 2007 21:54:41 +0000
parents 50d1581f2548
children 7206375cd8a6
comparison
equal deleted inserted replaced
82444:364ec6a9a30b 82445:8bed2c8a10f1
94 (when 94 (when
95 (condition-case err 95 (condition-case err
96 (re-search-forward (concat "\\(" copyright-regexp 96 (re-search-forward (concat "\\(" copyright-regexp
97 "\\)\\([ \t]*\n\\)?.*\\(?:" 97 "\\)\\([ \t]*\n\\)?.*\\(?:"
98 copyright-names-regexp "\\)") 98 copyright-names-regexp "\\)")
99 (if copyright-limit (+ (point) copyright-limit)) 99 (if copyright-limit
100 (+ (point) copyright-limit)
101 t)
100 t) 102 t)
101 ;; In case the regexp is rejected. This is useful because 103 ;; In case the regexp is rejected. This is useful because
102 ;; copyright-update is typically called from before-save-hook where 104 ;; copyright-update is typically called from before-save-hook where
103 ;; such an error is very inconvenient for the user. 105 ;; such an error is very inconvenient for the user.
104 (error (message "Can't update copyright: %s" err) nil)) 106 (error (message "Can't update copyright: %s" err) nil))