# HG changeset patch # User Karl Heuer # Date 837462399 0 # Node ID 0f1c12e3587958d0ca527c463c04511f7eefa462 # Parent 4942f03c75f8d6d50ecebf57d024a15131c011d3 (texinfo-format-today): Avoid race condition by getting current time only once. diff -r 4942f03c75f8 -r 0f1c12e35879 lisp/textmodes/texinfmt.el --- a/lisp/textmodes/texinfmt.el Mon Jul 15 20:23:12 1996 +0000 +++ b/lisp/textmodes/texinfmt.el Mon Jul 15 20:26:39 1996 +0000 @@ -891,11 +891,6 @@ (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 @@ ; 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