Use a separate face for expanded log-view bodies

* lisp/vc/log-view.el (log-view-commit-body): Define new face.
(log-view-toggle-entry-display): Implement 'log-view-commit-body'
face (bug#44424).
This commit is contained in:
Protesilaos Stavrou 2020-11-09 17:14:24 +01:00 committed by Lars Ingebrigtsen
parent 391260e46c
commit 1f0b929430
2 changed files with 18 additions and 1 deletions

View file

@ -435,6 +435,11 @@ their 'default-directory' under VC.
*** New command 'vc-dir-root' uses the root directory without asking. *** New command 'vc-dir-root' uses the root directory without asking.
---
*** New face 'log-view-commit-body'.
This is used when expanding commit messages from 'vc-print-root-log'
and similar commands.
--- ---
*** The responsible VC backend is now the most specific one. *** The responsible VC backend is now the most specific one.
'vc-responsible-backend' loops over the backends in 'vc-responsible-backend' loops over the backends in

View file

@ -208,6 +208,18 @@ If it is nil, `log-view-toggle-entry-display' does nothing.")
"Face for the message header line in `log-view-mode'." "Face for the message header line in `log-view-mode'."
:group 'log-view) :group 'log-view)
(defface log-view-commit-body
'((((class color) (min-colors 88) (background light))
:background "gray95" :foreground "black" :extend t)
(((class color) (min-colors 88) (background dark))
:background "gray5" :foreground "white" :extend t)
(((class color) (min-colors 8) (background light))
:foreground "black")
(((class color) (min-colors 8) (background dark))
:foreground "white"))
"Face for the commit body in `log-view-mode'."
:version "28.1")
(defvar log-view-file-re (defvar log-view-file-re
(concat "^\\(?:Working file: \\(?1:.+\\)" ;RCS and CVS. (concat "^\\(?:Working file: \\(?1:.+\\)" ;RCS and CVS.
;; Subversion has no such thing?? ;; Subversion has no such thing??
@ -415,7 +427,7 @@ This calls `log-view-expanded-log-entry-function' to do the work."
(insert long-entry "\n") (insert long-entry "\n")
(add-text-properties (add-text-properties
beg (point) beg (point)
'(font-lock-face font-lock-comment-face log-view-comment t)) '(font-lock-face log-view-commit-body log-view-comment t))
(goto-char opoint)))))))) (goto-char opoint))))))))
(defun log-view-beginning-of-defun (&optional arg) (defun log-view-beginning-of-defun (&optional arg)