From 0301b295bb89f63689c892665af0a57d23a27809 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Wed, 22 Jun 2022 06:23:24 +0200 Subject: [PATCH] Don't drop existing escape char in eshell * lisp/eshell/em-term.el (eshell-exec-visual): Don't drop existing escape char. --- lisp/eshell/em-term.el | 6 ++++-- 1 file 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. -- 2.39.2