1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-28 07:45:00 +00:00

(copyright-update-year): Delete code that replaces 20xy with xy.

This commit is contained in:
Luc Teirlinck 2004-08-18 02:11:36 +00:00
parent 101c421e7e
commit 697f502a87

View File

@ -124,26 +124,6 @@ When this is `function', only ask when called non-interactively."
(eq (char-after (+ (point) size -2)) ?-))) (eq (char-after (+ (point) size -2)) ?-)))
;; This is a range so just replace the end part. ;; This is a range so just replace the end part.
(delete-char size) (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 a comma with the preferred number of spaces.
(insert (insert
(save-excursion (save-excursion