summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/copyright.el
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2005-05-16 15:49:27 +0000
committerKaroly Lorentey <lorentey@elte.hu>2005-05-16 15:49:27 +0000
commit35bc5d82600f330082298823f09f53259a90ea81 (patch)
tree328e8f1df7bcd3cb68f4dfa7de371543da885c89 /lisp/emacs-lisp/copyright.el
parent133fe4c8a2d944324dc2c9a42b01ab1d258ad49d (diff)
parentcc211a0ff8145e0814413e237bb5674d615968b7 (diff)
downloademacs-35bc5d82600f330082298823f09f53259a90ea81.tar.gz
emacs-35bc5d82600f330082298823f09f53259a90ea81.tar.bz2
emacs-35bc5d82600f330082298823f09f53259a90ea81.zip
Merged from miles@gnu.org--gnu-2005 (patch 307-312)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-307 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-308 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-309 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-310 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-311 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-312 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-346
Diffstat (limited to 'lisp/emacs-lisp/copyright.el')
-rw-r--r--lisp/emacs-lisp/copyright.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el
index c2d3303c825..30c76b8769a 100644
--- a/lisp/emacs-lisp/copyright.el
+++ b/lisp/emacs-lisp/copyright.el
@@ -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))