[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 d6e2c59: Fix pre- and post-command-hook errors in
[Emacs-diffs] emacs-26 d6e2c59: Fix pre- and post-command-hook errors in term.el
Sun, 22 Apr 2018 13:08:18 -0400 (EDT)
Author: Karl Otness <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Fix pre- and post-command-hook errors in term.el
Before this patch, after the terminal process dies the command
hooks added in term-mode's char mode would produce errors.
This fix removes these hooks when the process dies.
* lisp/term.el (term-handle-exit): Remove pre-command-hook and
post-command-hook because the process is dead. (Bug#31236)
lisp/term.el | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lisp/term.el b/lisp/term.el
index 6860ea6..75c2779 100644
@@ -1484,6 +1484,9 @@ The main purpose is to get rid of the local keymap."
(let ((buffer-read-only nil)
+ ;; Remove hooks to avoid errors due to dead process.
+ (remove-hook 'pre-command-hook #'term-set-goto-process-mark t)
+ (remove-hook 'post-command-hook #'term-goto-process-mark-maybe t)
;; Record where we put the message, so we can ignore it
;; later on.
|[Prev in Thread]
||[Next in Thread]|
- [Emacs-diffs] emacs-26 d6e2c59: Fix pre- and post-command-hook errors in term.el,
Eli Zaretskii <=