diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2024-07-25 12:37:34 +0200 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2024-07-25 14:40:35 +0200 |
commit | e56e4b345a25194bc7adb83523e8d886b718c9fa (patch) | |
tree | 9e9624790fa40595b5260b0446bb3be5b7c34259 /lisp/emacs-lisp | |
parent | d2cb9f2bf6ef9f3fcd8c21455ca1f1e624e61bf4 (diff) | |
download | emacs-e56e4b345a25194bc7adb83523e8d886b718c9fa.tar.gz emacs-e56e4b345a25194bc7adb83523e8d886b718c9fa.tar.bz2 emacs-e56e4b345a25194bc7adb83523e8d886b718c9fa.zip |
Use timer accessors instead of aref/aset
* lisp/emacs-lisp/timer-list.el (list-timers):
* lisp/gnus/mail-source.el (mail-source-start-idle-timer):
* lisp/play/gamegrid.el (gamegrid-set-timer):
* lisp/progmodes/vhdl-mode.el (vhdl-run-when-idle):
* lisp/simple.el (analyze-text-conversion):
* lisp/time.el (display-time-event-handler):
Use timer accessors.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/timer-list.el | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/timer-list.el b/lisp/emacs-lisp/timer-list.el index 52309a247c0..c237eeb52af 100644 --- a/lisp/emacs-lisp/timer-list.el +++ b/lisp/emacs-lisp/timer-list.el @@ -41,23 +41,21 @@ nil `[ ;; Idle. ,(propertize - (if (aref timer 7) " *" " ") + (if (timer--idle-delay timer) " *" " ") 'help-echo "* marks idle timers" 'timer timer) ;; Next time. ,(propertize - (let ((time (list (aref timer 1) - (aref timer 2) - (aref timer 3)))) + (let ((time (timer--time timer))) (format "%12s" (format-seconds "%dd %hh %mm %z%,1ss" (float-time - (if (aref timer 7) + (if (timer--idle-delay timer) time (time-subtract time nil)))))) 'help-echo "Time until next invocation") ;; Repeat. - ,(let ((repeat (aref timer 4))) + ,(let ((repeat (timer--repeat-delay timer))) (cond ((numberp repeat) (propertize @@ -73,7 +71,7 @@ (let ((cl-print-compiled 'static) (cl-print-compiled-button nil) (print-escape-newlines t)) - (cl-prin1-to-string (aref timer 5))) + (cl-prin1-to-string (timer--function timer))) 'help-echo "Function called by timer")])) (append timer-list timer-idle-list))) (tabulated-list-print)) |