Function: vc-log-internal-common

vc-log-internal-common is a byte-compiled function defined in vc.el.gz.

Signature

(vc-log-internal-common BACKEND BUFFER-NAME FILES TYPE BACKEND-FUNC SETUP-BUTTONS-FUNC GOTO-LOCATION-FUNC REV-BUFF-FUNC)

Source Code

;; Defined in /usr/src/emacs/lisp/vc/vc.el.gz
(defun vc-log-internal-common (backend
			       buffer-name
			       files
			       type
			       backend-func
			       setup-buttons-func
			       goto-location-func
			       rev-buff-func)
  (let (retval (buffer (get-buffer-create buffer-name)))
    (with-current-buffer buffer
      (setq-local vc-log-view-type type))
    (setq retval (funcall backend-func backend buffer-name type files))
    (with-current-buffer buffer
      (let ((inhibit-read-only t))
	;; log-view-mode used to be called with inhibit-read-only bound
	;; to t, so let's keep doing it, just in case.
	(vc-call-backend backend
                         (if (and (eq type 'with-diff)
                                  (vc-find-backend-function
                                   backend 'region-history-mode))
                             'region-history-mode
                           'log-view-mode))
        (setq-local log-view-vc-backend backend)
        (setq-local log-view-vc-fileset files)
        (setq-local revert-buffer-function rev-buff-func)))
    ;; Display after setting up major-mode, so display-buffer-alist can know
    ;; the major-mode.
    (pop-to-buffer buffer)
    (vc-run-delayed
     (let ((inhibit-read-only t))
       (funcall setup-buttons-func backend files retval)
       (when goto-location-func
         (funcall goto-location-func backend)
         (setq vc-sentinel-movepoint (point)))
       (set-buffer-modified-p nil)
       (run-hooks 'vc-log-finish-functions)))))