`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
1 changed files with 9 additions and 2 deletions
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]
|
["Forward Output Group" term-next-prompt t]
|
||||||
["Kill Current Output Group" term-kill-output t]))
|
["Kill Current Output Group" term-kill-output t]))
|
||||||
map)
|
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
|
(defvar term-escape-char nil
|
||||||
"Escape character for char sub-mode of term mode.
|
"Escape character for char sub-mode of term mode.
|
||||||
|
@ -958,7 +959,9 @@ underlying shell."
|
||||||
(dotimes (key 21)
|
(dotimes (key 21)
|
||||||
(keymap-set map (format "<f%d>" key) #'term-send-function-key)))
|
(keymap-set map (format "<f%d>" key) #'term-send-function-key)))
|
||||||
map)
|
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
|
(easy-menu-define term-terminal-menu
|
||||||
(list term-mode-map term-raw-map term-pager-break-map)
|
(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
|
and the variable `term-prompt-regexp' to the appropriate regular
|
||||||
expression.
|
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:
|
Commands in raw mode:
|
||||||
|
|
||||||
\\{term-raw-map}
|
\\{term-raw-map}
|
||||||
|
|
Loading…
Add table
Reference in a new issue