emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master a0ee57c80d 4/4: shell: Add repeat-map for shell-{forward, backwar


From: Eli Zaretskii
Subject: master a0ee57c80d 4/4: shell: Add repeat-map for shell-{forward, backward}-prompt
Date: Thu, 17 Nov 2022 04:37:31 -0500 (EST)

branch: master
commit a0ee57c80dea105ab08aad3c0cdce11e43b5fa29
Author: Brian Leung <leungbk@posteo.net>
Commit: Eli Zaretskii <eliz@gnu.org>

    shell: Add repeat-map for shell-{forward,backward}-prompt
    
    * lisp/shell.el (shell-repeat-map): New defvar.  (Bug#59144)
---
 lisp/shell.el | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lisp/shell.el b/lisp/shell.el
index 641f274045..7c3c925ab8 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]