summaryrefslogtreecommitdiff
path: root/lisp/comint.el
diff options
context:
space:
mode:
authorBrian Leung <leungbk@posteo.net>2022-11-08 22:03:29 -0800
committerEli Zaretskii <eliz@gnu.org>2022-11-17 11:34:57 +0200
commit84472c3363e4e80ec68e38eb798e8c4c15dc208e (patch)
treee496e7a2dc32416190349a686e583f1d322b1b74 /lisp/comint.el
parent667857211072a0d80192e49cf9788ccdbfa856c5 (diff)
downloademacs-84472c3363e4e80ec68e38eb798e8c4c15dc208e.tar.gz
comint: Add repeat-map for comint-{next,previous}-prompt
* lisp/comint.el (comint-repeat-map): New keymap. (Bug#59144)
Diffstat (limited to 'lisp/comint.el')
-rw-r--r--lisp/comint.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index 07ced8d321a..93b97cb22b4 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -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.