summaryrefslogtreecommitdiff
path: root/lisp/eshell
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/eshell')
-rw-r--r--lisp/eshell/em-term.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/eshell/em-term.el b/lisp/eshell/em-term.el
index d150c07b030..9000e8c8784 100644
--- a/lisp/eshell/em-term.el
+++ b/lisp/eshell/em-term.el
@@ -186,8 +186,10 @@ allowed."
(set-process-sentinel proc #'eshell-term-sentinel)
(error "Failed to invoke visual command")))
(term-char-mode)
- (if eshell-escape-control-x
- (term-set-escape-char ?\C-x))))
+ (when eshell-escape-control-x
+ ;; Don't drop existing escape char.
+ (let (term-escape-char)
+ (term-set-escape-char ?\C-x)))))
nil)
;; Process sentinels receive two arguments.