]> git.eshelyaron.com Git - emacs.git/commitdiff
(copyright-fix-years): Match properly if the first year is 2-digit.
authorRichard M. Stallman <rms@gnu.org>
Sun, 15 May 2005 22:03:16 +0000 (22:03 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 15 May 2005 22:03:16 +0000 (22:03 +0000)
Don't mess up the whitespace after the years by filling.

lisp/ChangeLog
lisp/emacs-lisp/copyright.el

index 2dcf6630f25efcb0426e1750175b78da98ff9d44..0c4a20be97caed41cbd40d26f633773e362cb604 100644 (file)
@@ -5,6 +5,17 @@
 
 2005-05-15  Richard M. Stallman  <rms@gnu.org>
 
+       * emacs-lisp/copyright.el (copyright-fix-years):
+       Match properly if the first year is 2-digit.
+       Don't mess up the whitespace after the years by filling.
+
+       * dired-aux.el (dired-mark-confirm):
+       Pass t to dired-get-marked-files for DISTINGUISH-ONE-MARKED.
+
+       * dired.el (dired-map-over-marks): New arg DISTINGUISH-ONE-MARKED.
+       (dired-get-marked-files): New arg DISTINGUISH-ONE-MARKED.
+       (dired-mark-pop-up): Handle FILES = (t FILE) specially.
+
        * emacs-lisp/lisp-mode.el (lisp-mode-variables):
        Set font-lock-comment-start-skip.
 
index c2d3303c825963aeb2e53b32e7024f56a8afc0ea..30c76b8769a64c85484055cebe170a41b17cea4d 100644 (file)
@@ -189,6 +189,8 @@ Uses heuristic: year >= 50 means 19xx, < 50 means 20xx."
            last)
        (set-marker e (1+ (match-end 2)))
        (goto-char s)
+       ;; Back up one character so that our search can match the first year.
+       (backward-char 1)
        (while (and (< (point) (marker-position e))
                    (re-search-forward "\\([^0-9]\\)\\([0-9]+\\)[^0-9]"
                                       (marker-position e) t))
@@ -204,8 +206,12 @@ Uses heuristic: year >= 50 means 19xx, < 50 means 20xx."
            (setq last p)))
        (when last
          (goto-char last)
-         (let ((fill-prefix "     "))
-           (fill-region s last))
+         ;; Don't mess up whitespace after the years.
+         (skip-chars-backward " \t")
+         (save-restriction
+           (narrow-to-region (point-min) (point))
+           (let ((fill-prefix "     "))
+             (fill-region s last)))
          )
        (set-marker e nil)
        (copyright-update nil t))