aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/time-stamp.el36
2 files changed, 23 insertions, 18 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7882d1e4624..9db8862f563 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12000-10-25 Stephen Gildea <gildea@alum.mit.edu>
2
3 * time-stamp.el (time-stamp-string-preprocess): Fix a wrong
4 type argument error.
5
12000-10-25 Miles Bader <miles@gnu.org> 62000-10-25 Miles Bader <miles@gnu.org>
2 7
3 * recentf.el (recentf-mode): Variable removed. 8 * recentf.el (recentf-mode): Variable removed.
diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el
index 7768c74751f..b34ddfe0b60 100644
--- a/lisp/time-stamp.el
+++ b/lisp/time-stamp.el
@@ -3,7 +3,7 @@
3;; Copyright 1989, 1993, 1994, 1995, 1997, 2000 3;; Copyright 1989, 1993, 1994, 1995, 1997, 2000
4;;; Free Software Foundation, Inc. 4;;; Free Software Foundation, Inc.
5 5
6;; Maintainer's Time-stamp: <2000-06-07 13:05:45 gildea> 6;; Maintainer's Time-stamp: <2000-10-23 16:08:34 gildea>
7;; Maintainer: Stephen Gildea <gildea@alum.mit.edu> 7;; Maintainer: Stephen Gildea <gildea@alum.mit.edu>
8;; Keywords: tools 8;; Keywords: tools
9 9
@@ -575,23 +575,23 @@ Optionally use FORMAT."
575 ((eq cur-char ?h) ;mail host name 575 ((eq cur-char ?h) ;mail host name
576 (time-stamp-mail-host-name)) 576 (time-stamp-mail-host-name))
577 )) 577 ))
578 (if (string-equal field-width "") 578 (let ((padded-result
579 field-result 579 (format (format "%%%s%c"
580 (let ((padded-result 580 field-width
581 (format (format "%%%s%c" 581 (if (numberp field-result) ?d ?s))
582 field-width 582 (or field-result ""))))
583 (if (numberp field-result) ?d ?s)) 583 (let* ((initial-length (length padded-result))
584 (or field-result "")))) 584 (desired-length (if (string-equal field-width "")
585 (let ((initial-length (length padded-result)) 585 initial-length
586 (desired-length (string-to-int field-width))) 586 (string-to-int field-width))))
587 (if (> initial-length desired-length) 587 (if (> initial-length desired-length)
588 ;; truncate strings on right, years on left 588 ;; truncate strings on right, years on left
589 (if (stringp field-result) 589 (if (stringp field-result)
590 (substring padded-result 0 desired-length) 590 (substring padded-result 0 desired-length)
591 (if (eq cur-char ?y) 591 (if (eq cur-char ?y)
592 (substring padded-result (- desired-length)) 592 (substring padded-result (- desired-length))
593 padded-result)) ;non-year numbers don't truncate 593 padded-result)) ;non-year numbers don't truncate
594 padded-result))))) 594 padded-result))))
595 (t 595 (t
596 (char-to-string cur-char))))) 596 (char-to-string cur-char)))))
597 (setq ind (1+ ind))) 597 (setq ind (1+ ind)))