emacs-devel
[Top][All Lists]
Advanced

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

Re: jit-lock timer etc.


From: Richard Stallman
Subject: Re: jit-lock timer etc.
Date: Thu, 24 Aug 2006 01:20:39 -0400

     > creates an ordinary timer, not an idle timer.
     > It will run even if Emacs is not idle.

    It simply tries to mimic the behavior of `jit-lock-stealth-fontify'
    without sit-fors.

But it doesn't.  If the user types something, sit-for will return, but
the arrival of input has no effect on the (ordinary) timer.

     > I think this ought to use run-with-idle-timer
     > and current-idle-time, as in my patch.

    I was not able to accomplish that since the idle timer does not trigger.
    In analogy to your patch I replaced the above by

           (when (and jit-lock-stealth-buffers jit-lock-stealth-time)
            ;; Call us again.
            (timer-set-idle-time jit-lock-stealth-repeat-timer 
(current-idle-time))
            (timer-inc-time jit-lock-stealth-repeat-timer delay)
            (timer-activate-when-idle jit-lock-stealth-repeat-timer t)

    but I suspect that calling `timer-set-idle-time' with the return value
    of `current-idle-time' does not DTRT:

Please try using time-to-seconds to convert.

    I tried to replace `timer-set-idle-time' with `timer-set-time' but without
    avail.

That's like trying to fix a flat tire by breaking the car's windshield.
Why even consider it?




reply via email to

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