[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: jit-lock timer etc.
From: |
martin rudalics |
Subject: |
Re: jit-lock timer etc. |
Date: |
Wed, 23 Aug 2006 14:27:25 +0200 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
> I have now read your patch, and I think it is a good approach.
> However, this
>
> ! (when (and jit-lock-stealth-buffers jit-lock-stealth-time)
> ! ;; Call us again.
> ! (setq jit-lock-stealth-repeat-timer
> ! (run-at-time delay nil 'jit-lock-stealth-fontify t))))))
>
> 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. The ordinary timer is considered to substitute the
original "(while (and buffers ..." loop.
> 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:
(timer-set-idle-time timer secs &optional repeat)
Set the trigger idle time of timer to _secs_.
(current-idle-time)
Return the current length of Emacs idleness.
The value is returned as a list of _three integers_.
I tried to replace `timer-set-idle-time' with `timer-set-time' but without
avail.
- jit-lock timer etc., Richard Stallman, 2006/08/21
- Re: jit-lock timer etc., Kim F. Storm, 2006/08/21
- Re: jit-lock timer etc., martin rudalics, 2006/08/21
- Re: jit-lock timer etc., Chong Yidong, 2006/08/21
- Re: jit-lock timer etc., martin rudalics, 2006/08/21
- Re: jit-lock timer etc., Chong Yidong, 2006/08/21
- Re: jit-lock timer etc., Kim F. Storm, 2006/08/22
- Re: jit-lock timer etc., Richard Stallman, 2006/08/22
- Re: jit-lock timer etc.,
martin rudalics <=
- Re: jit-lock timer etc., Kim F. Storm, 2006/08/23
- Re: jit-lock timer etc., Richard Stallman, 2006/08/24
- Re: jit-lock timer etc., Kim F. Storm, 2006/08/24
- Re: jit-lock timer etc., Kim F. Storm, 2006/08/24
- Re: jit-lock timer etc., Kim F. Storm, 2006/08/24
- Re: jit-lock timer etc., Chong Yidong, 2006/08/24
- Re: jit-lock timer etc., Richard Stallman, 2006/08/25
- Re: jit-lock timer etc., Kim F. Storm, 2006/08/25
- Re: jit-lock timer etc., Richard Stallman, 2006/08/25
- Re: jit-lock timer etc., Chong Yidong, 2006/08/25