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').
This commit is contained in:
Michael Heerdegen 2022-06-21 13:41:51 +02:00
parent 8f5d9d0abd
commit edf6f5d0ca

View file

@ -1467,10 +1467,10 @@ process."
(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 ()