]> git.eshelyaron.com Git - emacs.git/commitdiff
Omit some (current-time) calls
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 1 Aug 2022 07:38:33 +0000 (00:38 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 1 Aug 2022 08:17:16 +0000 (01:17 -0700)
* 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
lisp/emacs-lisp/shortdoc.el
lisp/find-lisp.el
lisp/progmodes/hideif.el
lisp/tar-mode.el

index 49b54c2d00fb777906886341f74087776d0e1a96..c8ff6b68144fddb38dd3c45d6c783a5a06b55bf1 100644 (file)
@@ -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"
index 315afd4312be5f81ee90e3b63b14a388cdf0764c..d187af9ac83fded8080fcb17073b43ef37a0bebb 100644 (file)
@@ -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)")
index 0a712c0b811dad0e97a0f7ffe039868204a3ac6a..e825d9cba04f3a108e2eccb01b38f1513e94c5c1 100644 (file)
@@ -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
index f2ada676ab738353665cd79564d6a2d6aafd2a51..d09e1f4cdfe91d700a286b978e33460192d1e65e 100644 (file)
@@ -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)
index d7a0978969903651ce325e0c919b87229a09a82f..20ad6e1e46ad4878631b65052a2c8e75e581fa96 100644 (file)
@@ -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