* Re: [elpa] 04/07: diff-hl-mode: defer diff-hl-update until diff-hl-mode-on-hook
[not found] ` <E1XGW3J-0001C7-GH@vcs.savannah.gnu.org>
@ 2014-08-10 16:45 ` Stefan Monnier
2014-08-11 0:01 ` Dmitry
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2014-08-10 16:45 UTC (permalink / raw)
To: emacs-devel
> + (add-hook (if vc-mode
> + 'diff-hl-mode-on-hook
> + 'find-file-hook)
> + 'diff-hl-update t t)
I think this deserves a comment (both for the use of a hook, and for the
use of a different hook depending on vc-mode).
> (add-hook 'after-revert-hook 'diff-hl-update nil t)
> (add-hook 'magit-revert-buffer-hook 'diff-hl-update nil t)
And I think this deserves a comment as well explaining why
after-revert-hook doesn't already cover the magit case.
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [elpa] 04/07: diff-hl-mode: defer diff-hl-update until diff-hl-mode-on-hook
2014-08-10 16:45 ` [elpa] 04/07: diff-hl-mode: defer diff-hl-update until diff-hl-mode-on-hook Stefan Monnier
@ 2014-08-11 0:01 ` Dmitry
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry @ 2014-08-11 0:01 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> + (add-hook (if vc-mode
>> + 'diff-hl-mode-on-hook
>> + 'find-file-hook)
>> + 'diff-hl-update t t)
>
> I think this deserves a comment (both for the use of a hook, and for the
> use of a different hook depending on vc-mode).
>
>> (add-hook 'after-revert-hook 'diff-hl-update nil t)
>> (add-hook 'magit-revert-buffer-hook 'diff-hl-update nil t)
>
> And I think this deserves a comment as well explaining why
> after-revert-hook doesn't already cover the magit case.
Some explanations added.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-08-11 0:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20140810163259.4503.16742@vcs.savannah.gnu.org>
[not found] ` <E1XGW3J-0001C7-GH@vcs.savannah.gnu.org>
2014-08-10 16:45 ` [elpa] 04/07: diff-hl-mode: defer diff-hl-update until diff-hl-mode-on-hook Stefan Monnier
2014-08-11 0:01 ` Dmitry
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.