unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Sean Whitton <spwhitton@spwhitton.name>
To: emacs-devel@gnu.org
Cc: Sean Whitton <spwhitton@spwhitton.name>
Subject: [PATCH] eshell-exec-visual: Don't drop existing escape char
Date: Mon, 20 Jun 2022 17:35:49 -0700	[thread overview]
Message-ID: <20220621003549.1092032-1-spwhitton@spwhitton.name> (raw)

Since this code was written, `term-set-escape-char' has begun undoing
previous calls to itself.  Additionally, there is nothing in the
documentation for `eshell-escape-control-x' suggesting it is meant to
replace the existing escape char as opposed to adding a second.  See
also comments in `ansi-term'.

* lisp/eshell/em-term.el (eshell-exec-visual): Don't drop existing
escape char.
---
 lisp/eshell/em-term.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/eshell/em-term.el b/lisp/eshell/em-term.el
index d150c07b03..6aefb8b599 100644
--- a/lisp/eshell/em-term.el
+++ b/lisp/eshell/em-term.el
@@ -187,7 +187,8 @@ eshell-exec-visual
 	  (error "Failed to invoke visual command")))
       (term-char-mode)
       (if eshell-escape-control-x
-	  (term-set-escape-char ?\C-x))))
+          ;; Don't drop existing escape char.
+          (let (term-escape-char) (term-set-escape-char ?\C-x)))))
   nil)
 
 ;; Process sentinels receive two arguments.
-- 
2.30.2




             reply	other threads:[~2022-06-21  0:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-21  0:35 Sean Whitton [this message]
2022-06-22  4:23 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220621003549.1092032-1-spwhitton@spwhitton.name \
    --to=spwhitton@spwhitton.name \
    --cc=emacs-devel@gnu.org \
    --subject='Re: [PATCH] eshell-exec-visual: Don'\''t drop existing escape char' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).