aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/time-stamp.el
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1997-06-08 21:45:16 +0000
committerRichard M. Stallman <[email protected]>1997-06-08 21:45:16 +0000
commitfdac7fbaa2c0559b37c6f18ecabf50e8f3334e2a (patch)
treeb59b3a8b66e07f6afe6407372c159e75da968a9b /lisp/time-stamp.el
parentfd72ddf609b417abf526ccc8865631f813e066e1 (diff)
(time-stamp-string-preprocess, time-stamp-do-number):
Avoid compiler warnings: pass all arguments to time-stamp-do-number explicitly, not dynamically.
Diffstat (limited to 'lisp/time-stamp.el')
-rw-r--r--lisp/time-stamp.el21
1 files changed, 11 insertions, 10 deletions
diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el
index f357ddc706..d4f1e1f3d1 100644
--- a/lisp/time-stamp.el
+++ b/lisp/time-stamp.el
@@ -2,7 +2,7 @@
;; Copyright 1989, 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
-;; Maintainer's Time-stamp: <1997-06-01 17:02:45 gildea>
+;; Maintainer's Time-stamp: <1997-06-08 16:45:41 gildea>
;; Maintainer: Stephen Gildea <[email protected]>
;; Keywords: tools
@@ -348,15 +348,15 @@ With arg, turn time stamping on if and only if arg is positive."
(time-stamp-conv-warn "%B" "%#B"))
(format-time-string "%#B" time)))
((eq cur-char ?d) ;day of month, 1-31
- (time-stamp-do-number cur-char))
+ (time-stamp-do-number cur-char alt-form field-width time))
((eq cur-char ?H) ;hour, 0-23
- (time-stamp-do-number cur-char))
+ (time-stamp-do-number cur-char alt-form field-width time))
((eq cur-char ?I) ;hour, 1-12
- (time-stamp-do-number cur-char))
+ (time-stamp-do-number cur-char alt-form field-width time))
((eq cur-char ?m) ;month number, 1-12
- (time-stamp-do-number cur-char))
+ (time-stamp-do-number cur-char alt-form field-width time))
((eq cur-char ?M) ;minute, 0-59
- (time-stamp-do-number cur-char))
+ (time-stamp-do-number cur-char alt-form field-width time))
((eq cur-char ?p) ;am or pm
(or change-case
(time-stamp-conv-warn "%p" "%#p"))
@@ -364,7 +364,7 @@ With arg, turn time stamping on if and only if arg is positive."
((eq cur-char ?P) ;AM or PM
(format-time-string "%p" time))
((eq cur-char ?S) ;seconds, 00-60
- (time-stamp-do-number cur-char))
+ (time-stamp-do-number cur-char alt-form field-width time))
((eq cur-char ?w) ;weekday number, Sunday is 0
(format-time-string "%w" time))
((eq cur-char ?y) ;year
@@ -417,10 +417,11 @@ With arg, turn time stamping on if and only if arg is positive."
(setq ind (1+ ind)))
result))
-(defun time-stamp-do-number (format-char)
- ;; Handle compatible cases where only
+(defun time-stamp-do-number (format-char alt-form field-width time)
+ ;; Handle a compatible FORMAT-CHAR where only
;; the default width/padding will change.
- ;; Uses dynamic vars field-width, time.
+ ;; ALT-FORM is whether `#' specified. FIELD-WIDTH is the string
+ ;; width specification or "". TIME is the time to convert.
(let ((format-string (concat "%" (char-to-string format-char))))
(and (not alt-form) (string-equal field-width "")
(time-stamp-conv-warn format-string