summaryrefslogtreecommitdiff
path: root/lisp/time-stamp.el
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2000-10-25 12:08:59 +0000
committerGerd Moellmann <gerd@gnu.org>2000-10-25 12:08:59 +0000
commitb6735035d27e0842e4dcb46c9da73cf9bef5a889 (patch)
tree3846d58d7579fc86cba34268f5dccee90f18912e /lisp/time-stamp.el
parent3a641a69d3f069de8814550233e44e39df505894 (diff)
downloademacs-b6735035d27e0842e4dcb46c9da73cf9bef5a889.tar.gz
(time-stamp-string-preprocess): Fix a wrong
type argument error.
Diffstat (limited to 'lisp/time-stamp.el')
-rw-r--r--lisp/time-stamp.el36
1 files changed, 18 insertions, 18 deletions
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 @@
;; Copyright 1989, 1993, 1994, 1995, 1997, 2000
;;; Free Software Foundation, Inc.
-;; Maintainer's Time-stamp: <2000-06-07 13:05:45 gildea>
+;; Maintainer's Time-stamp: <2000-10-23 16:08:34 gildea>
;; Maintainer: Stephen Gildea <gildea@alum.mit.edu>
;; Keywords: tools
@@ -575,23 +575,23 @@ Optionally use FORMAT."
((eq cur-char ?h) ;mail host name
(time-stamp-mail-host-name))
))
- (if (string-equal field-width "")
- field-result
- (let ((padded-result
- (format (format "%%%s%c"
- field-width
- (if (numberp field-result) ?d ?s))
- (or field-result ""))))
- (let ((initial-length (length padded-result))
- (desired-length (string-to-int field-width)))
- (if (> initial-length desired-length)
- ;; truncate strings on right, years on left
- (if (stringp field-result)
- (substring padded-result 0 desired-length)
- (if (eq cur-char ?y)
- (substring padded-result (- desired-length))
- padded-result)) ;non-year numbers don't truncate
- padded-result)))))
+ (let ((padded-result
+ (format (format "%%%s%c"
+ field-width
+ (if (numberp field-result) ?d ?s))
+ (or field-result ""))))
+ (let* ((initial-length (length padded-result))
+ (desired-length (if (string-equal field-width "")
+ initial-length
+ (string-to-int field-width))))
+ (if (> initial-length desired-length)
+ ;; truncate strings on right, years on left
+ (if (stringp field-result)
+ (substring padded-result 0 desired-length)
+ (if (eq cur-char ?y)
+ (substring padded-result (- desired-length))
+ padded-result)) ;non-year numbers don't truncate
+ padded-result))))
(t
(char-to-string cur-char)))))
(setq ind (1+ ind)))