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

From: Eli Zaretskii <[email-masked]>
Date: Mon, 28 Oct 2019 19:00:57 +0200

> From: Lars Ingebrigtsen <[email-masked]>
> Date: Mon, 28 Oct 2019 16:55:02 +0100
> Cc: Phil Sainty <[email-masked]>, [email-masked]
> 
> 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.

  $ fgrep run-with-timer lisp/ChangeLog.*
  lisp/ChangeLog.17:15268:     (desktop-auto-save-set-timer): Replace `run-with-timer' with
  lisp/ChangeLog.6:2135:       (run-with-timer): Just call run-at-time.
  lisp/ChangeLog.6:2797:       * timer.el (run-with-timer): Set repetition interval.
  lisp/ChangeLog.6:2925:       (run-with-timer): Renamed from run-after-delay.
  lisp/ChangeLog.6:2926:       (run-at-time, run-with-timer): Return the timer.

  $ fgrep run-after-delay lisp/ChangeLog.*
  lisp/ChangeLog.6:2935:       (run-after-delay): New function.

And if you look up the last match, you will see that run-after-delay
was added on the same day timer.el got rewritten using the internal
timers (before that -- oh horror! -- it worked by running an external
program which delivered a signal to Emacs when the time came).

Does that answer your question?

(I don't really understand what would we gain by obsoleting such a
popular function.)