unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] eshell-exec-visual: Don't drop existing escape char
@ 2022-06-21  0:35 Sean Whitton
  2022-06-22  4:23 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Sean Whitton @ 2022-06-21  0:35 UTC (permalink / raw)
  To: emacs-devel; +Cc: Sean Whitton

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




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] eshell-exec-visual: Don't drop existing escape char
  2022-06-21  0:35 [PATCH] eshell-exec-visual: Don't drop existing escape char Sean Whitton
@ 2022-06-22  4:23 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-22  4:23 UTC (permalink / raw)
  To: Sean Whitton; +Cc: emacs-devel

Sean Whitton <spwhitton@spwhitton.name> writes:

> * lisp/eshell/em-term.el (eshell-exec-visual): Don't drop existing
> escape char.

Thanks; pushed to Emacs 29 (with some whitespace changes).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-22  4:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-21  0:35 [PATCH] eshell-exec-visual: Don't drop existing escape char Sean Whitton
2022-06-22  4:23 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public 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).