summaryrefslogtreecommitdiff
path: root/lisp/term.el
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-06-20 14:33:51 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-06-20 17:34:46 -0700
commit25e69968b05df4116ff669277386c1529c545d6b (patch)
treed1329e3b7243e0cc126682816841d9633794094f /lisp/term.el
parent4ae315f7c3b5bc370d9d66eab5428685a6097606 (diff)
downloademacs-25e69968b05df4116ff669277386c1529c545d6b.tar.gz
term-set-escape-char: Remove old binding from term-raw-escape-map
* lisp/term.el (term-set-escape-char): When replacing the escape char, remove the binding of the old escape char in term-raw-escape-map.
Diffstat (limited to 'lisp/term.el')
-rw-r--r--lisp/term.el5
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/term.el b/lisp/term.el
index f81cbf72930..94bf13e9736 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -1052,11 +1052,10 @@ underlying shell."
"Change `term-escape-char' and keymaps that depend on it."
(when term-escape-char
;; Undo previous term-set-escape-char.
- (define-key term-raw-map term-escape-char 'term-send-raw))
+ (define-key term-raw-map term-escape-char 'term-send-raw)
+ (define-key term-raw-escape-map term-escape-char nil t))
(setq term-escape-char (if (vectorp key) key (vector key)))
(define-key term-raw-map term-escape-char term-raw-escape-map)
- ;; FIXME: If we later call term-set-escape-char again with another key,
- ;; we should undo this binding.
(define-key term-raw-escape-map term-escape-char 'term-send-raw))
(term-set-escape-char (or term-escape-char ?\C-c))