[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master d634cb0954 11/16: Omit some (current-time) calls
From: |
Paul Eggert |
Subject: |
master d634cb0954 11/16: Omit some (current-time) calls |
Date: |
Mon, 1 Aug 2022 04:17:28 -0400 (EDT) |
branch: master
commit d634cb09547eb5ffba105b6c90410fd843bf029d
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>
Omit some (current-time) calls
* lisp/emacs-lisp/ert.el (ert-write-junit-test-summary-report):
* lisp/emacs-lisp/shortdoc.el (file):
* lisp/find-lisp.el (find-lisp-find-dired-insert-file):
* lisp/progmodes/hideif.el (hide-ifdefs):
* lisp/tar-mode.el (tar-subfile-save-buffer):
Prefer nil or omitted arg to (current-time) where this is better
or more-efficient.
---
lisp/emacs-lisp/ert.el | 2 +-
lisp/emacs-lisp/shortdoc.el | 2 +-
lisp/find-lisp.el | 2 +-
lisp/progmodes/hideif.el | 3 +--
lisp/tar-mode.el | 2 +-
5 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el
index 49b54c2d00..c8ff6b6814 100644
--- a/lisp/emacs-lisp/ert.el
+++ b/lisp/emacs-lisp/ert.el
@@ -1692,7 +1692,7 @@ test packages depend on each other, it might be helpful.")
(string-match-p "^Running 0 tests" logfile-contents))
(insert (format " <testsuite id=\"%s\" name=\"%s\"
tests=\"1\" errors=\"1\" failures=\"0\" skipped=\"0\" time=\"0\"
timestamp=\"%s\">\n"
id test-report
- (ert--format-time-iso8601 (current-time))))
+ (ert--format-time-iso8601 nil)))
(insert (format " <testcase name=\"Test report missing
%s\" status=\"error\" time=\"0\">\n"
(file-name-nondirectory test-report)))
(insert (format " <error message=\"Test report missing
%s\" type=\"error\">\n"
diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el
index 315afd4312..d187af9ac8 100644
--- a/lisp/emacs-lisp/shortdoc.el
+++ b/lisp/emacs-lisp/shortdoc.el
@@ -503,7 +503,7 @@ A FUNC form can have any number of `:no-eval' (or
`:no-value'),
(set-file-modes
:no-value "(set-file-modes \"/tmp/foo\" #o644)")
(set-file-times
- :no-value (set-file-times "/tmp/foo" (current-time)))
+ :no-value (set-file-times "/tmp/foo"))
"File Modes"
(set-default-file-modes
:no-value "(set-default-file-modes #o755)")
diff --git a/lisp/find-lisp.el b/lisp/find-lisp.el
index 0a712c0b81..e825d9cba0 100644
--- a/lisp/find-lisp.el
+++ b/lisp/find-lisp.el
@@ -281,7 +281,7 @@ It is a function which takes two arguments, the directory
and its parent."
(set-buffer buffer)
(insert find-lisp-line-indent
(find-lisp-format file (file-attributes file 'string) (list "")
- (current-time))))
+ nil)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Lifted from ls-lisp. We don't want to require it, because that
diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el
index f2ada676ab..d09e1f4cdf 100644
--- a/lisp/progmodes/hideif.el
+++ b/lisp/progmodes/hideif.el
@@ -2521,8 +2521,7 @@ Turn off hiding by calling `show-ifdefs'."
(or hide-ifdef-read-only hif-outside-read-only))
(and hide-ifdef-verbose
(message "Hiding done, %.1f seconds elapsed"
- (float-time (time-subtract (current-time)
- hide-start-time)))))))
+ (float-time (time-subtract nil hide-start-time)))))))
(defun show-ifdefs (&optional start end)
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el
index d7a0978969..20ad6e1e46 100644
--- a/lisp/tar-mode.el
+++ b/lisp/tar-mode.el
@@ -1377,7 +1377,7 @@ to make your changes permanent."
;; Maybe update the datestamp.
(when tar-update-datestamp
(tar-alter-one-field tar-time-offset
- (concat (tar-octal-time (current-time)) " "))))
+ (concat (tar-octal-time nil) " "))))
;; After doing the insertion, add any necessary final padding.
(tar-pad-to-blocksize))
(set-buffer-modified-p t) ; mark the tar file as modified
- master updated (ee0ce18662 -> bec8474a45), Paul Eggert, 2022/08/01
- master 24e1123241 06/16: Improve time-equal-p etc. performance, Paul Eggert, 2022/08/01
- master 914cf4b91b 04/16: Make time arithmetic more like comparison, Paul Eggert, 2022/08/01
- master afa67ed6f2 08/16: Fix year-285428751 bug in hanoi-unix-64, Paul Eggert, 2022/08/01
- master 353413a76b 10/16: * lisp/vc/vc.el: Remove stray comment hyphen., Paul Eggert, 2022/08/01
- master 932c0bc1fc 01/16: Tune blv_found, Paul Eggert, 2022/08/01
- master d6c054a007 09/16: Fix "cons up a storm" issue in type-break, Paul Eggert, 2022/08/01
- master a51863f73d 12/16: Simplify a few timestamps, Paul Eggert, 2022/08/01
- master d634cb0954 11/16: Omit some (current-time) calls,
Paul Eggert <=
- master 2cd204d8bb 13/16: Prefer ‘time-equal-p’ to ‘equal’ on timestamps, Paul Eggert, 2022/08/01
- master 72c3efd7d0 15/16: Fix time comparison in primitive-undo, Paul Eggert, 2022/08/01
- master bec8474a45 16/16: Improve GCC pacification in xterm.c, Paul Eggert, 2022/08/01
- master 0a4477415c 05/16: Improve float-time etc. performance, Paul Eggert, 2022/08/01
- master 9d4633e934 02/16: (time-equal-p nil X) returns nil, Paul Eggert, 2022/08/01
- master e3b6242938 03/16: Fix get-internal-runtime precision, Paul Eggert, 2022/08/01
- master 2fd2008e67 07/16: * src/timefns.c (Ffloat_time): Fix doc string., Paul Eggert, 2022/08/01
- master 4d896c0977 14/16: Use list-form timestamps in .nnmh-articles, Paul Eggert, 2022/08/01