summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1996-07-15 20:26:39 +0000
committerKarl Heuer <kwzh@gnu.org>1996-07-15 20:26:39 +0000
commita1cfbf35a94c7464d714b369f73a9952fbb158d9 (patch)
tree419018c96cca3f12c793e53d4c7b5c52b3c8fb58 /lisp
parent0d26feea890428ff5616b9e219778c092cd6e164 (diff)
downloademacs-a1cfbf35a94c7464d714b369f73a9952fbb158d9.tar.gz
(texinfo-format-today): Avoid race condition by getting current time only once.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/textmodes/texinfmt.el10
1 files changed, 1 insertions, 9 deletions
diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el
index 50a5c5dd534..a5ad374d1fd 100644
--- a/lisp/textmodes/texinfmt.el
+++ b/lisp/textmodes/texinfmt.el
@@ -891,11 +891,6 @@ lower types.")
(file-name-nondirectory (expand-file-name arg)))
(insert "Info file: "
texinfo-format-filename ", -*-Text-*-\n"
- ;; Date string removed so that regression testing is easier.
- ;; "produced on "
- ;; (substring (current-time-string) 8 10) " "
- ;; (substring (current-time-string) 4 7) " "
- ;; (substring (current-time-string) -4) " "
"produced by `texinfo-format-buffer'\n"
"from file"
(if (buffer-file-name input-buffer)
@@ -1568,10 +1563,7 @@ Used by @refill indenting command to avoid indenting within lists, etc.")
; The `@today{}' command requires a pair of braces, like `@dots{}'.
(defun texinfo-format-today ()
(texinfo-parse-arg-discard)
- (insert (format "%s %s %s"
- (substring (current-time-string) 8 10)
- (substring (current-time-string) 4 7)
- (substring (current-time-string) -4))))
+ (insert (format-time-string "%e %b %Y")))
;;; @ignore