bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#37875: 27.0.50; `run-with-timer' not documented in (elisp)Timers


From: Lars Ingebrigtsen
Subject: bug#37875: 27.0.50; `run-with-timer' not documented in (elisp)Timers
Date: Mon, 28 Oct 2019 16:55:02 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Phil Sainty <psainty@orcon.net.nz> writes:
>
>> I just noticed that `run-with-timer' is not mentioned anywhere
>> in the elisp manual.
>>
>> (elisp)Timers even mentions `run-with-idle-timer', which also has
>> its own node at (elisp)Idle Timers; however `run-with-timer' is
>> not pointed out.
>
> It mentions `run-at-time' which is ... quite the same?  I share your
> confusion: seems the commands `run-at-time' and `run-with-timer' can be
> merged and one can be made an alias for the other.

The definition is:

(defun run-with-timer (secs repeat function &rest args)
[...]
  (apply 'run-at-time secs repeat function args))

So that's a kinda strange function to have?

It's used about 50 places in the in-tree code; run-at-time is used about
80 places.  run-at-time has a better name, I think, but run-with-timer
has a name that's analogous to run-with-idle-timer.

Does anybody know why run-with-timer was added?  I think we should
obsolete one or the other, and I think run-at-time has the best name.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]