From edf6f5d0cae97de10c914c6e94dc5b35f06ec33c Mon Sep 17 00:00:00 2001 From: Michael Heerdegen Date: Tue, 21 Jun 2022 13:41:51 +0200 Subject: [PATCH] Fix Bug#56110 (switching from line-mode to char-mode) * lisp/term.el (term-char-mode): Make `add-function' override the correct place (the buffer local variable `term-input-sender'). --- 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