help-gnu-emacs
[Top][All Lists]
Advanced

[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: Fri, 16 Nov 2012 10:30:22 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> That explains it. I'm on Emacs 24.1 and it does not have this
> scheduling code, so that's why it works for me. I didn't think
> they changed this recently.

> Anyway, you can try calling diff-refine-hunk explicitly after
> diff-hunk-next then:

>   (condition-case nil      
>       (save-excursion
>         (goto-char (point-min))
>         (while (not (eobp))
>           (diff-hunk-next)
>           (diff-refine-hunk)))
>     (error nil)))

> I can't try it, because I use 24.1, but it may work.

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.


        Stefan




reply via email to

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