[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#18128: Should be done as part of the font-lock
From: |
Hong Xu |
Subject: |
bug#18128: Should be done as part of the font-lock |
Date: |
Fri, 04 Nov 2016 00:54:17 -0700 |
User-agent: |
mu4e 0.9.17; emacs 25.1.50.3 |
I currently use the following to do auto refining: (modified from
http://emacs.stackexchange.com/a/28321/2755 )
(defun my-diff-refine-all ()
"Refine all diffs."
(interactive)
(save-excursion
(goto-char (point-min))
(ignore-errors
(diff-beginning-of-hunk t))
(ignore-errors
(while (not (eobp))
(diff-refine-hunk)
(diff-hunk-next)))))
(defun my-diff-hunks-highlight-all ()
"Highlight all hunks in diff-mode."
(add-hook 'font-lock-mode-hook #'my-diff-refine-all t t))
(add-hook 'diff-mode-hook 'my-diff-hunks-highlight-all)
Not sure whether it is possible to merge into Emacs after some
adjustment.
signature.asc
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#18128: Should be done as part of the font-lock,
Hong Xu <=