From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Cc: "Mattias Engdegård" <mattiase@acm.org>
Subject: Re: master e56e4b345a2: Use timer accessors instead of aref/aset
Date: Tue, 30 Jul 2024 14:43:35 -0400 [thread overview]
Message-ID: <jwv8qxi912v.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20240725124103.A15EBC35350@vcs2.savannah.gnu.org> ("Mattias Engdegård via Mailing list for Emacs changes"'s message of "Thu, 25 Jul 2024 08:41:02 -0400 (EDT)")
> commit e56e4b345a25194bc7adb83523e8d886b718c9fa
> Author: Mattias Engdegård <mattiase@acm.org>
> Commit: Mattias Engdegård <mattiase@acm.org>
>
> 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.
> diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
> index 144bfa944d3..22706be6bb5 100644
> --- a/lisp/progmodes/vhdl-mode.el
> +++ b/lisp/progmodes/vhdl-mode.el
> @@ -2341,7 +2341,7 @@ Ignore byte-compiler warnings you might see."
> (if (fboundp 'start-itimer)
> (start-itimer "vhdl-mode" function secs repeat t)
> ;; explicitly activate timer (necessary when Emacs is already idle)
> - (aset (run-with-idle-timer secs repeat function) 0 nil)))
> + (setf (timer--triggered (run-with-idle-timer secs repeat function)) nil)))
`vhdl-mode.el` likes to be compatible with XEmacs, so this change might
be problematic. I'm not sure if it's still important, but I'll also
note that, according to my reading of the `timer.el` code, the timer
objects returned by `run-with-idle-timer` already have their `triggered`
field set to nil.
I'm not sure if it's always been the case, but maybe we could make the
`aset` conditional on `(< emacs-major-version 30)` (or some older version
number once we investigate since when this is the case)?
Stefan
next parent reply other threads:[~2024-07-30 18:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <172191126257.28696.12556479493109361955@vcs2.savannah.gnu.org>
[not found] ` <20240725124103.A15EBC35350@vcs2.savannah.gnu.org>
2024-07-30 18:43 ` Stefan Monnier [this message]
2024-07-30 21:01 ` master e56e4b345a2: Use timer accessors instead of aref/aset Mattias Engdegård
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv8qxi912v.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=mattiase@acm.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.