bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#56110: 27+; switching from line-mode to char-mode


From: Michael Heerdegen
Subject: bug#56110: 27+; switching from line-mode to char-mode
Date: Tue, 21 Jun 2022 14:20:16 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Stefan, how would a fix look like that fits your intention?

This maybe?

From db062f00cbd4cdf5934237dee3350046a40f0482 Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <michael_heerdegen@web.de>
Date: Tue, 21 Jun 2022 13:41:51 +0200
Subject: [PATCH] WIP: Fix 56110

---
 lisp/term.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/term.el b/lisp/term.el
index 94bf13e973..a8e44b4c34 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -1467,10 +1467,10 @@ term-char-mode
       (when (> (point) pmark)
        (unwind-protect
            (progn
-             (add-function :override term-input-sender #'term-send-string)
+             (add-function :override (local 'term-input-sender) 
#'term-send-string)
              (end-of-line)
              (term-send-input))
-         (remove-function term-input-sender #'term-send-string))))
+         (remove-function (local 'term-input-sender) #'term-send-string))))
     (term-update-mode-line)))

 (defun term-line-mode  ()
--
2.30.2

[ I first failed to do this correctly because I had tried with
(local term-input-sender) instead of (local 'term-input-sender) - maybe
we can warn about that syntax missing that quote? ]

TIA,

Michael.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]