mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2026-09-10 15:56:35 -04:00
vc-dir: Set major mode before popping to the buffer
* lisp/vc/vc-dir.el (vc-dir): Set major mode before popping to the buffer (bug#81613).
This commit is contained in:
parent
aae4cb25da
commit
c5a9ed1499
|
|
@ -1747,18 +1747,20 @@ These are the commands available for use in the file status buffer:
|
|||
nil t nil nil)))))
|
||||
(unless backend
|
||||
(setq backend (vc-responsible-backend dir)))
|
||||
(let (pop-up-windows) ; based on cvs-examine; bug#6204
|
||||
(pop-to-buffer (vc-dir-prepare-status-buffer "*vc-dir*" dir backend)))
|
||||
(if (derived-mode-p 'vc-dir-mode)
|
||||
(vc-dir-refresh)
|
||||
;; FIXME: find a better way to pass the backend to `vc-dir-mode'.
|
||||
(let ((use-vc-backend backend))
|
||||
(vc-dir-mode)
|
||||
;; Activate the backend-specific minor mode, if any.
|
||||
(when-let* ((minor-mode
|
||||
(intern-soft (format "vc-dir-%s-mode"
|
||||
(downcase (symbol-name backend))))))
|
||||
(funcall minor-mode 1)))))
|
||||
(let ((pop-up-windows) ; based on cvs-examine; bug#6204
|
||||
(buffer (vc-dir-prepare-status-buffer "*vc-dir*" dir backend)))
|
||||
(with-current-buffer buffer
|
||||
(if (derived-mode-p 'vc-dir-mode)
|
||||
(vc-dir-refresh)
|
||||
;; FIXME: find a better way to pass the backend to `vc-dir-mode'.
|
||||
(let ((use-vc-backend backend))
|
||||
(vc-dir-mode)
|
||||
;; Activate the backend-specific minor mode, if any.
|
||||
(when-let* ((minor-mode
|
||||
(intern-soft (format "vc-dir-%s-mode"
|
||||
(downcase (symbol-name backend))))))
|
||||
(funcall minor-mode 1)))))
|
||||
(pop-to-buffer buffer)))
|
||||
|
||||
(defun vc-default-dir-extra-headers (_backend _dir)
|
||||
;; Be loud by default to remind people to add code to display
|
||||
|
|
|
|||
Loading…
Reference in a new issue