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


From: Luc Teirlinck
Subject: [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/copyright.el
Date: Tue, 17 Aug 2004 22:16:01 -0400

Index: emacs/lisp/emacs-lisp/copyright.el
diff -c emacs/lisp/emacs-lisp/copyright.el:1.47 
emacs/lisp/emacs-lisp/copyright.el:1.48
*** emacs/lisp/emacs-lisp/copyright.el:1.47     Mon Aug 16 22:43:09 2004
--- emacs/lisp/emacs-lisp/copyright.el  Wed Aug 18 02:11:36 2004
***************
*** 100,106 ****
        (forward-line 1)
        (re-search-forward comment-start-skip)
        (re-search-forward copyright-years-regexp))
!                 
      ;; Note that `current-time-string' isn't locale-sensitive.
      (setq copyright-current-year (substring (current-time-string) -4))
      (unless (string= (buffer-substring (- (match-end 2) 2) (match-end 2))
--- 100,106 ----
        (forward-line 1)
        (re-search-forward comment-start-skip)
        (re-search-forward copyright-years-regexp))
! 
      ;; Note that `current-time-string' isn't locale-sensitive.
      (setq copyright-current-year (substring (current-time-string) -4))
      (unless (string= (buffer-substring (- (match-end 2) 2) (match-end 2))
***************
*** 124,149 ****
                           (eq (char-after (+ (point) size -2)) ?-)))
                  ;; This is a range so just replace the end part.
                  (delete-char size)
-               ;; Detect if this is using the following shorthand:
-               ;; (C) 1993, 94, 95, 1998, 2000, 01, 02, 2003
-               (if (and
-                    ;; Check that the last year was 4-chars and same century.
-                    (eq size -4)
-                    (equal (buffer-substring (- (point) 4) (- (point) 2))
-                           (substring copyright-current-year 0 2))
-                    ;; Check that there are 2-char years as well.
-                    (save-excursion
-                      (re-search-backward "[^0-9][0-9][0-9][^0-9]"
-                                          (line-beginning-position) t))
-                    ;; Make sure we don't remove the first century marker.
-                    (save-excursion
-                      (forward-char size)
-                      (re-search-backward
-                       (concat (buffer-substring (point) (+ (point) 2))
-                               "[0-9][0-9]")
-                       (line-beginning-position) t)))
-                   ;; Remove the century marker of the last entry.
-                   (delete-region (- (point) 4) (- (point) 2)))
                ;; Insert a comma with the preferred number of spaces.
                (insert
                 (save-excursion
--- 124,129 ----




reply via email to

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