From: Hong Xu <hong@topbug.net>
To: 18128@debbugs.gnu.org
Subject: bug#18128: Should be done as part of the font-lock
Date: Fri, 04 Nov 2016 00:54:17 -0700 [thread overview]
Message-ID: <87y40zwuhi.fsf@topbug.net> (raw)
In-Reply-To: <569B3335.9020106@topbug.net>
[-- Attachment #1: Type: text/plain, Size: 703 bytes --]
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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
next prev parent reply other threads:[~2016-11-04 7:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-28 13:59 bug#18128: Diff-mode doesn't refine hunks automatically Paul Pogonyshev
2014-07-28 14:28 ` Eli Zaretskii
2014-07-28 14:39 ` Paul Pogonyshev
2014-07-28 14:44 ` Eli Zaretskii
2014-07-28 14:49 ` Paul Pogonyshev
2014-07-28 14:45 ` Paul Pogonyshev
2014-07-28 23:28 ` Stefan Monnier
2016-01-17 6:22 ` bug#18128: Should be done as part of the font-lock Hong Xu
2016-11-04 7:54 ` Hong Xu [this message]
2016-11-05 2:10 ` bug#18128: Diff-mode doesn't refine hunks automatically npostavs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y40zwuhi.fsf@topbug.net \
--to=hong@topbug.net \
--cc=18128@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.