diff options
| author | Juri Linkov | 2018-12-18 01:11:15 +0200 |
|---|---|---|
| committer | Juri Linkov | 2018-12-18 01:11:15 +0200 |
| commit | 6973b1489b24ca4190d24be9e5f887aef2cc9eff (patch) | |
| tree | e3d85774e1b34de4f41103f84e511adcd5a3264d /doc | |
| parent | c5e02f2bce28f3b1f2006ce1f208f4a92ca05ed9 (diff) | |
| download | emacs-6973b1489b24ca4190d24be9e5f887aef2cc9eff.tar.gz emacs-6973b1489b24ca4190d24be9e5f887aef2cc9eff.zip | |
Syntactic fontification of diff hunks (bug#33567)
* lisp/vc/diff-mode.el (diff-font-lock-syntax): New defcustom.
(diff-default-directory): New buffer-local variable.
(diff-indicator-removed, diff-indicator-added)
(diff-indicator-changed): Set foreground to distinctive colors.
(diff-context): Remove colors to make room for syntax highlighting.
(diff-font-lock-keywords): Add diff--font-lock-syntax.
(diff--font-lock-cleanup): Remove diff-mode syntax overlays.
(diff--font-lock-syntax, diff--font-lock-syntax--refresh)
(diff-syntax-fontify-revisions, diff-syntax-fontify-hunk)
(diff-syntax-fontify-props): New functions.
* lisp/vc/diff.el (diff-no-select): Set diff-default-directory to
default-directory.
* doc/emacs/files.texi (Diff Mode): Document diff-font-lock-syntax.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/files.texi | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index b47be51e24c..6e1faf84dcb 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi | |||
| @@ -1617,6 +1617,10 @@ displayed in the echo area). With a prefix argument, it tries to | |||
| 1617 | modify the original (``old'') source files rather than the patched | 1617 | modify the original (``old'') source files rather than the patched |
| 1618 | (``new'') source files. | 1618 | (``new'') source files. |
| 1619 | 1619 | ||
| 1620 | @vindex diff-font-lock-syntax | ||
| 1621 | If non-@code{nil}, fragments of source in hunks are highlighted | ||
| 1622 | according to the appropriate major mode. | ||
| 1623 | |||
| 1620 | @node Copying and Naming | 1624 | @node Copying and Naming |
| 1621 | @section Copying, Naming and Renaming Files | 1625 | @section Copying, Naming and Renaming Files |
| 1622 | 1626 | ||