]> git.eshelyaron.com Git - emacs.git/commitdiff
term-set-escape-char: Remove old binding from term-raw-escape-map
authorSean Whitton <spwhitton@spwhitton.name>
Mon, 20 Jun 2022 21:33:51 +0000 (14:33 -0700)
committerSean Whitton <spwhitton@spwhitton.name>
Tue, 21 Jun 2022 00:34:46 +0000 (17:34 -0700)
* 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.

lisp/term.el

index f81cbf72930f8635d1bd1fae6ae9bd1f18165409..94bf13e9736ae7a12ae25e0cab8cccd4aa08e9fd 100644 (file)
@@ -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))