Commit e0668e68 authored by Juri Linkov's avatar Juri Linkov

* 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.
parent 57d2f240
Pipeline #862 passed with stage
in 54 minutes and 19 seconds
......@@ -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
......
......@@ -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)
("^\\(#\\)\\(.*\\)"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment