emacs-devel
[Top][All Lists]
Advanced

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

RE: Should `cancel-timer' use `delete' instead of `delq'?


From: Drew Adams
Subject: RE: Should `cancel-timer' use `delete' instead of `delq'?
Date: Tue, 5 Sep 2006 12:22:45 -0700

    So "similar"
    timers aren't necessarily `equal', and not all timers that are `equal'
    were created with a call to `run-with-timer' with the same arguments.
    (Some may have been generated with `timer-create' directly!)  In other
    words, we use `eq' because using `equal' doesn't work (although
    there are
    obviously other implementations that could support such a practice).

    Perhaps what you want is `cancel-function-timers'?  Certainly
    for testing
    it's quite useful.  You could also just store some "mundane" value of
    `timer-list' somewhere and restore it instead of specifically cancelling
    anything.

Thanks for the info.

As I said, I have no problem with delq being used; I just wasn't certain of
the intention. Your post clarifies things.

The only "use case" I had in mind was what I sent before: the gotcha of
inadvertantly calling `run-with-idle-timer' more than once with the same
args, without thinking to cancel the previously launched timers.





reply via email to

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