aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Whitton2025-07-11 09:30:19 +0100
committerSean Whitton2025-07-11 09:30:19 +0100
commit5d048521e2715be75bd5ce0b3bc3d8aaacd2f46c (patch)
treed4122abd3937eb87cf9e5e53b166d2a5de2fb866
parent0814a93a040fffbf9d0be75b1ebdf432c0ce5f3c (diff)
downloademacs-5d048521e2715be75bd5ce0b3bc3d8aaacd2f46c.tar.gz
emacs-5d048521e2715be75bd5ce0b3bc3d8aaacd2f46c.zip
Apply vc-use-incoming-outgoing-prefixes to vc-dir-mode-map too
* lisp/vc/vc-dir.el (vc-use-incoming-outgoing-prefixes): * lisp/vc/vc-hooks.el: Apply vc-use-incoming-outgoing-prefixes to the corresponding bindings in vc-dir-mode-map, too.
-rw-r--r--lisp/vc/vc-dir.el4
-rw-r--r--lisp/vc/vc-hooks.el15
2 files changed, 14 insertions, 5 deletions
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index b8dd07cd294..340a3f28756 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -424,6 +424,10 @@ That is, refreshing the VC-Dir buffer also hides `up-to-date' and
424 map) 424 map)
425 "Keymap for directory buffer.") 425 "Keymap for directory buffer.")
426 426
427(when vc-use-incoming-outgoing-prefixes
428 (keymap-set vc-dir-mode-map "I" vc-incoming-prefix-map)
429 (keymap-set vc-dir-mode-map "O" vc-outgoing-prefix-map))
430
427(defmacro vc-dir-at-event (event &rest body) 431(defmacro vc-dir-at-event (event &rest body)
428 "Evaluate BODY with point located at `event-start' of EVENT. 432 "Evaluate BODY with point located at `event-start' of EVENT.
429If BODY uses EVENT, it should be a variable, 433If BODY uses EVENT, it should be a variable,
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
index 59226d6f066..4c5dcbf4e5f 100644
--- a/lisp/vc/vc-hooks.el
+++ b/lisp/vc/vc-hooks.el
@@ -971,11 +971,16 @@ other commands receive global bindings where they had none before."
971 :type 'boolean 971 :type 'boolean
972 :version "31.1" 972 :version "31.1"
973 :set (lambda (symbol value) 973 :set (lambda (symbol value)
974 (if value 974 (let ((maps (list vc-prefix-map)))
975 (progn (keymap-set vc-prefix-map "I" vc-incoming-prefix-map) 975 (when (boundp 'vc-dir-mode-map)
976 (keymap-set vc-prefix-map "O" vc-outgoing-prefix-map)) 976 (push vc-dir-mode-map maps))
977 (keymap-set vc-prefix-map "I" #'vc-log-incoming) 977 (if value
978 (keymap-set vc-prefix-map "O" #'vc-log-outgoing)) 978 (dolist (map maps)
979 (keymap-set map "I" vc-incoming-prefix-map)
980 (keymap-set map "O" vc-outgoing-prefix-map))
981 (dolist (map maps)
982 (keymap-set map "I" #'vc-log-incoming)
983 (keymap-set map "O" #'vc-log-outgoing))))
979 (set-default symbol value))) 984 (set-default symbol value)))
980 985
981(defvar vc-menu-map 986(defvar vc-menu-map