Function: vc-print-log-internal
vc-print-log-internal is a byte-compiled function defined in vc.el.gz.
Signature
(vc-print-log-internal BACKEND FILES WORKING-REVISION &optional IS-START-REVISION LIMIT TYPE)
Documentation
For specified BACKEND and FILES, show the VC log.
Leave point at WORKING-REVISION, if it is non-nil.
If IS-START-REVISION is non-nil, start the log from WORKING-REVISION
(not all backends support this); i.e., show only WORKING-REVISION and
earlier revisions. Show up to LIMIT entries (nil means unlimited).
LIMIT can also be a string, which means the revision before which to stop.
Source Code
;; Defined in /usr/src/emacs/lisp/vc/vc.el.gz
(defun vc-print-log-internal (backend files working-revision
&optional is-start-revision limit type)
"For specified BACKEND and FILES, show the VC log.
Leave point at WORKING-REVISION, if it is non-nil.
If IS-START-REVISION is non-nil, start the log from WORKING-REVISION
\(not all backends support this); i.e., show only WORKING-REVISION and
earlier revisions. Show up to LIMIT entries (nil means unlimited).
LIMIT can also be a string, which means the revision before which to stop."
;; Don't switch to the output buffer before running the command,
;; so that any buffer-local settings in the vc-controlled
;; buffer can be accessed by the command.
(let* ((dir-present (cl-some #'file-directory-p files))
(shortlog (not (null (memq (if dir-present 'directory 'file)
vc-log-short-style))))
(buffer-name "*vc-change-log*")
(type (or type (if shortlog 'short 'long))))
(vc-log-internal-common
backend buffer-name files type
(lambda (bk buf _type-arg files-arg)
(vc-call-backend bk 'print-log files-arg buf shortlog
(when is-start-revision working-revision) limit)
(when log-view-vc-prev-fileset
(with-current-buffer buf
(let ((inhibit-read-only t)
(pmark (process-mark (get-buffer-process buf))))
(goto-char (point-min))
(vc-print-log-renamed-add-button log-view-vc-prev-fileset
backend
nil
nil
log-view-vc-prev-revision
limit)
(insert "\n\n")
(when (< pmark (point))
(set-marker pmark (point)))))))
(lambda (_bk _files-arg ret)
(save-excursion
(vc-print-log-setup-buttons working-revision
is-start-revision limit ret)))
;; When it's nil, point really shouldn't move (bug#15322).
(when working-revision
(lambda (bk)
(vc-call-backend bk 'show-log-entry working-revision)))
(lambda (_ignore-auto _noconfirm)
(vc-print-log-internal backend files working-revision
is-start-revision limit type)))))