[Top][All Lists]

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

Re: Diff could also show the changes within lines

From: Stefan Monnier
Subject: Re: Diff could also show the changes within lines
Date: Mon, 19 Nov 2012 09:48:46 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

>> If you let-bind diff-auto-refine-mode to nil in the above code, not only
>> you'll be able to test it on Emacs-24.1 (and earlier), but you'll avoid
>> refining the hunks redundantly when diff-hunk-next does it.
> Good suggestion. Thank you.
> What I did not get in the new diff-mode implementation is why it
> uses run-at-time instead of run-with-idle-timer?
> run-at-time is for specifying a timer which runs at a specific time
> while run-with-idle-timer runs it when emacs becomes idle.  Isn't
> using run-with-idle-timer is more appropriate (makes the code clearer)
> in this case?

run-at-time timers don't run while Elisp is running either, they only
run when Elisp is being interrupted (e.g. during redisplay, or while
running process filters).  So the difference is pretty slim (more
specifically, there's only a difference in the case where diff-hunk-next
is run from code which later calls something like sit-for or redisplay).

> And why the code uses 0.0 instead of just 0?

I can't remember.

> Is there a difference?

No, no difference.


reply via email to

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