From bbe5cceac71e18df96cb25e21f936b4cfe68df01 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Fri, 17 Aug 2007 21:56:02 +0000 Subject: [PATCH] (copyright-update-year): Fix bug: Handle nil copyright-limit. --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/copyright.el | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2d41cfb66d1..1171fe04c6e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-08-17 Kimit Yada (tiny change) + + * emacs-lisp/copyright.el (copyright-update-year): + Fix bug: Handle nil copyright-limit. + 2007-08-17 Jay Belanger * calc/calc-units.el (math-standard-units): Give exact diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el index 5fdebea68f3..84f96b12ad5 100644 --- a/lisp/emacs-lisp/copyright.el +++ b/lisp/emacs-lisp/copyright.el @@ -96,7 +96,9 @@ When this is `function', only ask when called non-interactively." (re-search-forward (concat "\\(" copyright-regexp "\\)\\([ \t]*\n\\)?.*\\(?:" copyright-names-regexp "\\)") - (if copyright-limit (+ (point) copyright-limit)) + (if copyright-limit + (+ (point) copyright-limit) + t) t) ;; In case the regexp is rejected. This is useful because ;; copyright-update is typically called from before-save-hook where -- 2.39.2