]> git.eshelyaron.com Git - emacs.git/commitdiff
shell: Add repeat-map for shell-{forward,backward}-prompt
authorBrian Leung <leungbk@posteo.net>
Wed, 9 Nov 2022 07:18:23 +0000 (23:18 -0800)
committerEli Zaretskii <eliz@gnu.org>
Thu, 17 Nov 2022 09:36:32 +0000 (11:36 +0200)
* lisp/shell.el (shell-repeat-map): New defvar.  (Bug#59144)

lisp/shell.el

index 641f274045d6abe41d8c055154a3b024adae1ac8..7c3c925ab87ba23924e44f97387a32d37f53a6ee 100644 (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