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

lisp/comint.el

index 07ced8d321a39d879b90f4c21e25656d9e5df25e..93b97cb22b4dfad4b29bdd0666ea6d33f32af508 100644 (file)
@@ -604,6 +604,14 @@ via PTYs.")
                                       menu-bar-final-items))
     map))
 
+(defvar-keymap comint-repeat-map
+  :doc "Keymap to repeat comint key sequences.  Used in `repeat-mode'."
+  "C-n" #'comint-next-prompt
+  "C-p" #'comint-previous-prompt)
+
+(put #'comint-next-prompt 'repeat-map 'comint-repeat-map)
+(put #'comint-previous-prompt 'repeat-map 'comint-repeat-map)
+
 ;; Fixme: Is this still relevant?
 (defvar comint-ptyp t
   "Non-nil if communications via pty; false if by pipe.  Buffer local.