mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-22 07:09:54 +00:00
`term-mode': mention the keymap to add keybindings to
A user typically expects a keymap for mode `foo' to be called `foo-mode-map'. term-mode has `term-mode-map' too, but for user-defined bindings to have effect they have to be put to `term-raw-map' instead. So let's mention that. * lisp/term.el (term-mode) (term-mode-map) (term-raw-map): Mention the keymaps to add keybindings to for `term-mode'. (Bug#69786)
This commit is contained in:
parent
8cf05d9be1
commit
f48babb112
11
lisp/term.el
11
lisp/term.el
@ -658,7 +658,8 @@ executed once, when the buffer is created."
|
||||
["Forward Output Group" term-next-prompt t]
|
||||
["Kill Current Output Group" term-kill-output t]))
|
||||
map)
|
||||
"Keymap for Term mode.")
|
||||
"Keymap for \"line mode\" in Term mode. For custom keybindings purposes
|
||||
please note there is also `term-raw-map'")
|
||||
|
||||
(defvar term-escape-char nil
|
||||
"Escape character for char sub-mode of term mode.
|
||||
@ -958,7 +959,9 @@ underlying shell."
|
||||
(dotimes (key 21)
|
||||
(keymap-set map (format "<f%d>" key) #'term-send-function-key)))
|
||||
map)
|
||||
"Keyboard map for sending characters directly to the inferior process.")
|
||||
"Keyboard map for sending characters directly to the inferior process.
|
||||
For custom keybindings purposes please note there is also
|
||||
`term-mode-map'")
|
||||
|
||||
(easy-menu-define term-terminal-menu
|
||||
(list term-mode-map term-raw-map term-pager-break-map)
|
||||
@ -1122,6 +1125,10 @@ particular subprocesses. This can be done by setting the hooks
|
||||
and the variable `term-prompt-regexp' to the appropriate regular
|
||||
expression.
|
||||
|
||||
If you define custom keybindings, make sure to assign them to the
|
||||
correct keymap (or to both): use `term-raw-map' in raw mode and
|
||||
`term-mode-map' in line mode.
|
||||
|
||||
Commands in raw mode:
|
||||
|
||||
\\{term-raw-map}
|
||||
|
Loading…
Reference in New Issue
Block a user