emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/copyright.el,v


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/copyright.el,v
Date: Tue, 31 Jul 2007 05:02:58 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Miles Bader <miles>     07/07/31 05:02:54

Index: lisp/emacs-lisp/copyright.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/copyright.el,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -b -r1.61 -r1.62
--- lisp/emacs-lisp/copyright.el        26 Jul 2007 05:26:45 -0000      1.61
+++ lisp/emacs-lisp/copyright.el        31 Jul 2007 05:02:54 -0000      1.62
@@ -46,8 +46,8 @@
 ;; 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 @@
          (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 @@
          (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 @@
   (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 @@
   "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)
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]