# HG changeset patch # User Gerd Moellmann # Date 972475601 0 # Node ID 12f068b4d5ac252baa4106a589f547d979b81077 # Parent 1dbdec58e580f209955351c321713f9ec8d3d051 (time-stamp-string-preprocess): Fix a wrong type argument error. diff -r 1dbdec58e580 -r 12f068b4d5ac lisp/time-stamp.el --- a/lisp/time-stamp.el Wed Oct 25 11:55:10 2000 +0000 +++ b/lisp/time-stamp.el Wed Oct 25 12:06:41 2000 +0000 @@ -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 ;; Keywords: tools @@ -575,23 +575,23 @@ ((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)))