diff options
Diffstat (limited to 'lisp/vc.el')
| -rw-r--r-- | lisp/vc.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/vc.el b/lisp/vc.el index 09966322933..6ac3f655f4b 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -2061,7 +2061,7 @@ specific headers." | |||
| 2061 | (defun vc-default-extra-status-menu (backend) | 2061 | (defun vc-default-extra-status-menu (backend) |
| 2062 | nil) | 2062 | nil) |
| 2063 | 2063 | ||
| 2064 | (defun vc-dir-mode () | 2064 | (defun vc-dir-mode (entry-printer header-printer updater marker) |
| 2065 | "Major mode for showing the VC status for a directory. | 2065 | "Major mode for showing the VC status for a directory. |
| 2066 | Marking/Unmarking key bindings and actions: | 2066 | Marking/Unmarking key bindings and actions: |
| 2067 | m - marks a file/directory or ff the region is active, mark all the files | 2067 | m - marks a file/directory or ff the region is active, mark all the files |
| @@ -2092,13 +2092,13 @@ U - if the cursor is on a file: unmark all the files with the same VC state | |||
| 2092 | (erase-buffer) | 2092 | (erase-buffer) |
| 2093 | (set (make-local-variable 'vc-dir-process-buffer) nil) | 2093 | (set (make-local-variable 'vc-dir-process-buffer) nil) |
| 2094 | (set (make-local-variable 'vc-ewoc) | 2094 | (set (make-local-variable 'vc-ewoc) |
| 2095 | (ewoc-create #'vc-dir-printer | 2095 | (ewoc-create entry-printer |
| 2096 | #'vc-dir-header-maker)) | 2096 | header-printer)) |
| 2097 | (add-hook 'after-save-hook 'vc-dir-mark-buffer-changed) | 2097 | (add-hook 'after-save-hook marker) |
| 2098 | ;; Make sure that if the VC status buffer is killed, the update | 2098 | ;; Make sure that if the VC status buffer is killed, the update |
| 2099 | ;; process running in the background is also killed. | 2099 | ;; process running in the background is also killed. |
| 2100 | (add-hook 'kill-buffer-query-functions 'vc-dir-kill-query nil t) | 2100 | (add-hook 'kill-buffer-query-functions 'vc-dir-kill-query nil t) |
| 2101 | (vc-dir-refresh)) | 2101 | (eval updater)) |
| 2102 | (run-hooks 'vc-dir-mode-hook)) | 2102 | (run-hooks 'vc-dir-mode-hook)) |
| 2103 | 2103 | ||
| 2104 | (put 'vc-dir-mode 'mode-class 'special) | 2104 | (put 'vc-dir-mode 'mode-class 'special) |
| @@ -2110,7 +2110,10 @@ U - if the cursor is on a file: unmark all the files with the same VC state | |||
| 2110 | (pop-to-buffer (vc-dir-prepare-status-buffer dir)) | 2110 | (pop-to-buffer (vc-dir-prepare-status-buffer dir)) |
| 2111 | (if (eq major-mode 'vc-dir-mode) | 2111 | (if (eq major-mode 'vc-dir-mode) |
| 2112 | (vc-dir-refresh) | 2112 | (vc-dir-refresh) |
| 2113 | (vc-dir-mode))) | 2113 | (vc-dir-mode #'vc-dir-printer |
| 2114 | #'vc-dir-header-maker | ||
| 2115 | #'vc-dir-mark-buffer-changed | ||
| 2116 | #'vc-dir-refresh))) | ||
| 2114 | 2117 | ||
| 2115 | ;; This is used to that VC backends could add backend specific menu | 2118 | ;; This is used to that VC backends could add backend specific menu |
| 2116 | ;; items to vc-dir-menu-map. | 2119 | ;; items to vc-dir-menu-map. |