diff options
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/byte-opt.el | 2 | ||||
-rw-r--r-- | lisp/emacs-lisp/cl-extra.el | 2 | ||||
-rw-r--r-- | lisp/emacs-lisp/elint.el | 2 | ||||
-rw-r--r-- | lisp/emacs-lisp/timer.el | 9 |
4 files changed, 6 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index ecaa845fd3e..22fea1b8da9 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -1234,7 +1234,7 @@ symbol-function symbol-name symbol-plist symbol-value string-make-unibyte string-make-multibyte string-as-multibyte string-as-unibyte string-to-multibyte - tan truncate + tan time-convert truncate unibyte-char-to-multibyte upcase user-full-name user-login-name user-original-login-name custom-variable-p vconcat diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index ca33c56a958..4dc2e9de58f 100644 --- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el @@ -437,7 +437,7 @@ as an integer unless JUNK-ALLOWED is non-nil." ;; Random numbers. (defun cl--random-time () - (car (encode-time nil t))) + (car (time-convert nil t))) ;;;###autoload (autoload 'cl-random-state-p "cl-extra") (cl-defstruct (cl--random-state diff --git a/lisp/emacs-lisp/elint.el b/lisp/emacs-lisp/elint.el index 6927921bdac..b7ef6eeb2ae 100644 --- a/lisp/emacs-lisp/elint.el +++ b/lisp/emacs-lisp/elint.el @@ -141,7 +141,7 @@ Set by `elint-initialize', if `elint-scan-preloaded' is non-nil.") (defconst elint-unknown-builtin-args ;; encode-time allows extra arguments for use with decode-time. ;; For some reason, some people seem to like to use them in other cases. - '((encode-time second minute hour day month year &rest zone)) + '((encode-time time &rest obsolescent-arguments)) "Those built-ins for which we can't find arguments, if any.") (defvar elint-extra-errors '(file-locked file-supersession ftp-error) diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index 400f00a85b5..561cc70078f 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el @@ -57,7 +57,7 @@ (defun timer--time-setter (timer time) (timer--check timer) - (let ((lt (encode-time time 'list))) + (let ((lt (time-convert time 'list))) (setf (timer--high-seconds timer) (nth 0 lt)) (setf (timer--low-seconds timer) (nth 1 lt)) (setf (timer--usecs timer) (nth 2 lt)) @@ -96,10 +96,7 @@ fire each time Emacs is idle for that many seconds." "Yield the next value after TIME that is an integral multiple of SECS. More precisely, the next value, after TIME, that is an integral multiple of SECS seconds since the epoch. SECS may be a fraction." - (let* ((ticks-hz (if (and (consp time) (integerp (car time)) - (integerp (cdr time)) (< 0 (cdr time))) - time - (encode-time time 1000000000000))) + (let* ((ticks-hz (time-convert time t)) (ticks (car ticks-hz)) (hz (cdr ticks-hz)) trunc-s-ticks) @@ -109,7 +106,7 @@ of SECS seconds since the epoch. SECS may be a fraction." (setq ticks (ash ticks 1)) (setq hz (ash hz 1))) (let ((more-ticks (+ ticks trunc-s-ticks))) - (encode-time (cons (- more-ticks (% more-ticks trunc-s-ticks)) hz))))) + (time-convert (cons (- more-ticks (% more-ticks trunc-s-ticks)) hz))))) (defun timer-relative-time (time secs &optional usecs psecs) "Advance TIME by SECS seconds and optionally USECS microseconds |