shell: Add repeat-map for shell-{forward,backward}-prompt

* lisp/shell.el (shell-repeat-map): New defvar.  (Bug#59144)
This commit is contained in:
Brian Leung 2022-11-08 23:18:23 -08:00 committed by Eli Zaretskii
parent bd21696ff0
commit a0ee57c80d

View file

@ -393,6 +393,14 @@ Useful for shells like zsh that has this feature."
'complete-expand)
map))
(defvar-keymap shell-repeat-map
:doc "Keymap to repeat shell key sequences. Used in `repeat-mode'."
"C-f" #'shell-forward-command
"C-b" #'shell-backward-command)
(put #'shell-forward-command 'repeat-map 'shell-repeat-map)
(put #'shell-backward-command 'repeat-map 'shell-repeat-map)
(defcustom shell-mode-hook '()
"Hook for customizing Shell mode."
:type 'hook