Function: vc-git-log-view-mode
vc-git-log-view-mode is an interactive and byte-compiled function
defined in vc-git.el.gz.
Signature
(vc-git-log-view-mode)
Documentation
Major mode derived from log-view-mode by define-derived-mode.
It inherits all of the parent's attributes, but has its own keymap, abbrev table and syntax table:
vc-git-log-view-mode-map, vc-git-log-view-mode-abbrev-table and
vc-git-log-view-mode-syntax-table
which more-or-less shadow log-view-mode's corresponding tables.
In addition to any hooks its parent mode might have run, this mode
runs the hook vc-git-log-view-mode-hook, as the final or penultimate
step during initialization.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/vc/vc-git.el.gz
(define-derived-mode vc-git-log-view-mode log-view-mode "Git-Log-View"
(require 'add-log) ;; We need the faces add-log.
;; Don't have file markers, so use impossible regexp.
(setq-local log-view-file-re regexp-unmatchable)
(setq-local log-view-per-file-logs nil)
(setq-local log-view-message-re
(if (not (memq vc-log-view-type '(long log-search with-diff)))
(cadr vc-git-root-log-format)
"^commit +\\([0-9a-z]+\\)"))
;; Allow expanding short log entries.
(when (memq vc-log-view-type '(short log-outgoing log-incoming mergebase))
(setq truncate-lines t)
(setq-local log-view-expanded-log-entry-function
'vc-git-expanded-log-entry))
(setq-local log-view-font-lock-keywords
(if (not (memq vc-log-view-type '(long log-search with-diff)))
(list (cons (nth 1 vc-git-root-log-format)
(nth 2 vc-git-root-log-format)))
(append
`((,log-view-message-re (1 'change-log-acknowledgment)))
;; Handle the case:
;; user: foo@bar
'(("^Author:[ \t]+\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)"
(1 'change-log-email))
;; Handle the case:
;; user: FirstName LastName <foo@bar>
("^Author:[ \t]+\\([^<(]+?\\)[ \t]*[(<]\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)[>)]"
(1 'change-log-name)
(2 'change-log-email))
("^ +\\(?:\\(?:[Aa]cked\\|[Ss]igned-[Oo]ff\\)-[Bb]y:\\)[ \t]+\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)"
(1 'change-log-name))
("^ +\\(?:\\(?:[Aa]cked\\|[Ss]igned-[Oo]ff\\)-[Bb]y:\\)[ \t]+\\([^<(]+?\\)[ \t]*[(<]\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)[>)]"
(1 'change-log-name)
(2 'change-log-email))
("^Merge: \\([0-9a-z]+\\) \\([0-9a-z]+\\)"
(1 'change-log-acknowledgment)
(2 'change-log-acknowledgment))
("^\\(?:Date: \\|AuthorDate: \\)\\(.+\\)" (1 'change-log-date))
("^summary:[ \t]+\\(.+\\)" (1 'log-view-message)))))))