summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/copyright.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-07-31 05:50:45 +0000
committerMiles Bader <miles@gnu.org>2007-07-31 05:50:45 +0000
commit9899d01a0ccec166e04caa60657a44e614be50cd (patch)
tree6f7874938065fd9808765059213ff7a94ab3268b /lisp/emacs-lisp/copyright.el
parent96157d113ae5828cc280488211610db1960d572c (diff)
parent2f12b713116a4e15b4744fc78d5f0dbb57fcd1ca (diff)
downloademacs-9899d01a0ccec166e04caa60657a44e614be50cd.tar.gz
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 824-838) - Update from CVS - Merge from emacs--rel--22 - Remove lisp/erc/erc-nicklist.el - Update some .arch-inventory files - Fix void function definition error in cus-edit.el - Restore lisp/emacs-lisp/cl-loaddefs.el * emacs--rel--22 (patch 70-83) - Update from CVS - Remove lisp/erc/erc-nicklist.el - Update some .arch-inventory files - Indicate that emacs--devo--0--patch-834 does not need to be applied - Merge from gnus--rel--5.10 - Restore lisp/emacs-lisp/cl-loaddefs.el * gnus--rel--5.10 (patch 239-241) - Merge from emacs--devo--0 - Update from CVS Revision: emacs@sv.gnu.org/emacs--multi-tty--0--patch-28
Diffstat (limited to 'lisp/emacs-lisp/copyright.el')
-rw-r--r--lisp/emacs-lisp/copyright.el19
1 files changed, 11 insertions, 8 deletions
diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el
index 222a903efb8..8543bad2f4e 100644
--- a/lisp/emacs-lisp/copyright.el
+++ b/lisp/emacs-lisp/copyright.el
@@ -10,7 +10,7 @@
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
@@ -46,8 +46,8 @@ A value of nil means to search whole buffer."
;; The character classes have the Latin-1 version and the Latin-9
;; version, which is probably enough.
(defcustom copyright-regexp
- "\\([]\\|@copyright{}\\|[Cc]opyright\\s *:?\\s *\\(?:(C)\\)?\
-\\|[Cc]opyright\\s *:?\\s *[]\\)\
+ "\\([]\\|@copyright{}\\|[Cc]opyright\\s *:?\\s *\\(?:(C)\\)?\
+\\|[Cc]opyright\\s *:?\\s *[]\\)\
\\s *\\([1-9]\\([-0-9, ';/*%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)"
"What your copyright notice looks like.
The second \\( \\) construct must match the years."
@@ -95,7 +95,8 @@ When this is `function', only ask when called non-interactively."
(re-search-forward (concat "\\(" copyright-regexp
"\\)\\([ \t]*\n\\)?.*\\(?:"
copyright-names-regexp "\\)")
- (+ (point) copyright-limit) t)
+ (if copyright-limit (+ (point) copyright-limit))
+ t)
;; In case the regexp is rejected. This is useful because
;; copyright-update is typically called from before-save-hook where
;; such an error is very inconvenient for the user.
@@ -176,10 +177,11 @@ interactively."
(and copyright-current-gpl-version
;; match the GPL version comment in .el files, including the
;; bilingual Esperanto one in two-column, and in texinfo.tex
- (re-search-forward "\\(the Free Software Foundation;\
+ (re-search-forward
+ "\\(the Free Software Foundation;\
either \\|; a\\^u eldono \\([0-9]+\\)a, ? a\\^u (la\\^u via \\)\
version \\([0-9]+\\), or (at"
- (+ (point) copyright-limit) t)
+ (if copyright-limit (+ (point) copyright-limit)) t)
(not (string= (match-string 3) copyright-current-gpl-version))
(or noquery
(y-or-n-p (concat "Replace GPL version by "
@@ -201,7 +203,8 @@ Uses heuristic: year >= 50 means 19xx, < 50 means 20xx."
(interactive)
(widen)
(goto-char (point-min))
- (if (re-search-forward copyright-regexp (+ (point) copyright-limit) t)
+ (if (re-search-forward copyright-regexp
+ (if copyright-limit (+ (point) copyright-limit)) t)
(let ((s (match-beginning 2))
(e (copy-marker (1+ (match-end 2))))
(p (make-marker))
@@ -241,7 +244,7 @@ Uses heuristic: year >= 50 means 19xx, < 50 means 20xx."
"Copyright (C) " `(substring (current-time-string) -4) " by "
(or (getenv "ORGANIZATION")
str)
- '(if (> (point) (+ (point-min) copyright-limit))
+ '(if (and copyright-limit (> (point) (+ (point-min) copyright-limit)))
(message "Copyright extends beyond `copyright-limit' and won't be updated automatically."))
comment-end \n)