From: Juri Linkov Date: Mon, 25 Feb 2019 21:27:47 +0000 (+0200) Subject: * lisp/vc/diff-mode.el (diff-font-lock-keywords): Add more Git headers. X-Git-Tag: emacs-27.0.90~3537 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e0668e6871006a4ce8cbd769b67b2603b99336a2;p=emacs.git * 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. --- 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." (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 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.") ("^\\(?: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) ("^\\(#\\)\\(.*\\)"