diff options
| author | Juri Linkov | 2019-02-25 23:27:47 +0200 |
|---|---|---|
| committer | Juri Linkov | 2019-02-25 23:27:47 +0200 |
| commit | e0668e6871006a4ce8cbd769b67b2603b99336a2 (patch) | |
| tree | 1e06e4994361b711bf9b290090490f5d134e339b | |
| parent | 57d2f24005a2e553fa8225eaff8465e5fad06d46 (diff) | |
| download | emacs-e0668e6871006a4ce8cbd769b67b2603b99336a2.tar.gz emacs-e0668e6871006a4ce8cbd769b67b2603b99336a2.zip | |
* lisp/vc/diff-mode.el (diff-font-lock-keywords): Add more Git headers.
* lisp/gnus/mm-view.el (mm-display-inline-fontify): Set mode to
the selected major-mode, so diff-mode could be detected afterwards.
| -rw-r--r-- | lisp/gnus/mm-view.el | 3 | ||||
| -rw-r--r-- | lisp/vc/diff-mode.el | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el index b0d88d89843..8ce094349f2 100644 --- a/lisp/gnus/mm-view.el +++ b/lisp/gnus/mm-view.el | |||
| @@ -493,7 +493,8 @@ If MODE is not set, try to find mode automatically." | |||
| 493 | (let ((auto-mode-alist | 493 | (let ((auto-mode-alist |
| 494 | (delq (rassq 'doc-view-mode-maybe auto-mode-alist) | 494 | (delq (rassq 'doc-view-mode-maybe auto-mode-alist) |
| 495 | (copy-sequence auto-mode-alist)))) | 495 | (copy-sequence auto-mode-alist)))) |
| 496 | (set-auto-mode))) | 496 | (set-auto-mode) |
| 497 | (setq mode major-mode))) | ||
| 497 | ;; The mode function might have already turned on font-lock. | 498 | ;; The mode function might have already turned on font-lock. |
| 498 | ;; Do not fontify if the guess mode is fundamental. | 499 | ;; Do not fontify if the guess mode is fundamental. |
| 499 | (unless (or font-lock-mode | 500 | (unless (or font-lock-mode |
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index bad56391c6b..b22a5888984 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el | |||
| @@ -436,6 +436,7 @@ and the face `diff-added' for added lines.") | |||
| 436 | ("^\\(?:Index\\|revno\\): \\(.+\\).*\n" | 436 | ("^\\(?:Index\\|revno\\): \\(.+\\).*\n" |
| 437 | (0 'diff-header) (1 'diff-index prepend)) | 437 | (0 'diff-header) (1 'diff-index prepend)) |
| 438 | ("^\\(?:index .*\\.\\.\\|diff \\).*\n" . 'diff-header) | 438 | ("^\\(?:index .*\\.\\.\\|diff \\).*\n" . 'diff-header) |
| 439 | ("^\\(?:new\\|deleted\\) file mode .*\n" . 'diff-header) | ||
| 439 | ("^Only in .*\n" . 'diff-nonexistent) | 440 | ("^Only in .*\n" . 'diff-nonexistent) |
| 440 | ("^Binary files .* differ\n" . 'diff-file-header) | 441 | ("^Binary files .* differ\n" . 'diff-file-header) |
| 441 | ("^\\(#\\)\\(.*\\)" | 442 | ("^\\(#\\)\\(.*\\)" |