diff options
| author | Brian Leung | 2022-11-08 23:18:23 -0800 |
|---|---|---|
| committer | Eli Zaretskii | 2022-11-17 11:36:32 +0200 |
| commit | a0ee57c80dea105ab08aad3c0cdce11e43b5fa29 (patch) | |
| tree | 733ec3a4c058295a93fedccbe08adccbfefcc0cb | |
| parent | bd21696ff0c52f27a03f6dc538207da8710ed4c5 (diff) | |
| download | emacs-a0ee57c80dea105ab08aad3c0cdce11e43b5fa29.tar.gz emacs-a0ee57c80dea105ab08aad3c0cdce11e43b5fa29.zip | |
shell: Add repeat-map for shell-{forward,backward}-prompt
* lisp/shell.el (shell-repeat-map): New defvar. (Bug#59144)
| -rw-r--r-- | lisp/shell.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/shell.el b/lisp/shell.el index 641f274045d..7c3c925ab87 100644 --- a/lisp/shell.el +++ b/lisp/shell.el | |||
| @@ -393,6 +393,14 @@ Useful for shells like zsh that has this feature." | |||
| 393 | 'complete-expand) | 393 | 'complete-expand) |
| 394 | map)) | 394 | map)) |
| 395 | 395 | ||
| 396 | (defvar-keymap shell-repeat-map | ||
| 397 | :doc "Keymap to repeat shell key sequences. Used in `repeat-mode'." | ||
| 398 | "C-f" #'shell-forward-command | ||
| 399 | "C-b" #'shell-backward-command) | ||
| 400 | |||
| 401 | (put #'shell-forward-command 'repeat-map 'shell-repeat-map) | ||
| 402 | (put #'shell-backward-command 'repeat-map 'shell-repeat-map) | ||
| 403 | |||
| 396 | (defcustom shell-mode-hook '() | 404 | (defcustom shell-mode-hook '() |
| 397 | "Hook for customizing Shell mode." | 405 | "Hook for customizing Shell mode." |
| 398 | :type 'hook | 406 | :type 'hook |