]> git.eshelyaron.com Git - emacs.git/commitdiff
em-prompt: Add repeat-map for eshell-{next,previous}-prompt
authorBrian Leung <leungbk@posteo.net>
Wed, 9 Nov 2022 06:11:15 +0000 (22:11 -0800)
committerEli Zaretskii <eliz@gnu.org>
Thu, 17 Nov 2022 09:35:34 +0000 (11:35 +0200)
* lisp/eshell/em-prompt.el (eshell-prompt-repeat-map): New keymap.
(Bug#59144)

lisp/eshell/em-prompt.el

index a1a91e7d634acad1c8e166b4f30b6d561cfc9ba2..a8744de1dbadcf4651a066e39041f98aaeffaff2 100644 (file)
@@ -100,6 +100,14 @@ arriving, or after."
   "C-c C-n" #'eshell-next-prompt
   "C-c C-p" #'eshell-previous-prompt)
 
+(defvar-keymap eshell-prompt-repeat-map
+  :doc "Keymap to repeat eshell-prompt key sequences.  Used in `repeat-mode'."
+  "C-n" #'eshell-next-prompt
+  "C-p" #'eshell-previous-prompt)
+
+(put #'eshell-next-prompt 'repeat-map 'eshell-prompt-repeat-map)
+(put #'eshell-previous-prompt 'repeat-map 'eshell-prompt-repeat-map)
+
 ;;; Functions:
 
 (define-minor-mode eshell-prompt-mode