Mercurial > emacs
diff lisp/emacs-lisp/copyright.el @ 90998:539530fa389c
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 832-838)
- Remove lisp/erc/erc-nicklist.el
- Update some .arch-inventory files
- Fix void function definition error in cus-edit.el
- Update from CVS
- Restore lisp/emacs-lisp/cl-loaddefs.el
- Merge from emacs--rel--22
* emacs--rel--22 (patch 75-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--unicode--0--patch-239
author | Miles Bader <miles@gnu.org> |
---|---|
date | Fri, 03 Aug 2007 05:20:51 +0000 |
parents | f55f9811f5d7 e126e09e6ac7 |
children | aaccdab0ee26 |
line wrap: on
line diff
--- a/lisp/emacs-lisp/copyright.el Mon Jul 30 04:58:52 2007 +0000 +++ b/lisp/emacs-lisp/copyright.el Fri Aug 03 05:20:51 2007 +0000 @@ -44,9 +44,9 @@ (const :tag "No limit"))) (defcustom copyright-regexp - "\\(©\|@copyright{}\\|[Cc]opyright\\s *:?\\s *\\(?:(C)\\)?\ + "\\(©\\|@copyright{}\\|[Cc]opyright\\s *:?\\s *\\(?:(C)\\)?\ \\|[Cc]opyright\\s *:?\\s *©\\)\ -\\s *\\([1-9]\\([-0-9, ';\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)" +\\s *\\([1-9]\\([-0-9, ';/*%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)" "What your copyright notice looks like. The second \\( \\) construct must match the years." :group 'copyright @@ -93,7 +93,8 @@ (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. @@ -174,10 +175,11 @@ (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 " @@ -199,7 +201,8 @@ (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)) @@ -239,7 +242,7 @@ "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)