[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master e0668e6: * lisp/vc/diff-mode.el (diff-font-lock-key
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] master e0668e6: * lisp/vc/diff-mode.el (diff-font-lock-keywords): Add more Git headers. |
Date: |
Mon, 25 Feb 2019 16:27:57 -0500 (EST) |
branch: master
commit e0668e6871006a4ce8cbd769b67b2603b99336a2
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>
* 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.
---
lisp/gnus/mm-view.el | 3 ++-
lisp/vc/diff-mode.el | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el
index b0d88d8..8ce0943 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."
(let ((auto-mode-alist
(delq (rassq 'doc-view-mode-maybe auto-mode-alist)
(copy-sequence auto-mode-alist))))
- (set-auto-mode)))
+ (set-auto-mode)
+ (setq mode major-mode)))
;; The mode function might have already turned on font-lock.
;; Do not fontify if the guess mode is fundamental.
(unless (or font-lock-mode
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index bad5639..b22a588 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.")
("^\\(?:Index\\|revno\\): \\(.+\\).*\n"
(0 'diff-header) (1 'diff-index prepend))
("^\\(?:index .*\\.\\.\\|diff \\).*\n" . 'diff-header)
+ ("^\\(?:new\\|deleted\\) file mode .*\n" . 'diff-header)
("^Only in .*\n" . 'diff-nonexistent)
("^Binary files .* differ\n" . 'diff-file-header)
("^\\(#\\)\\(.*\\)"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master e0668e6: * lisp/vc/diff-mode.el (diff-font-lock-keywords): Add more Git headers.,
Juri Linkov <=