GNU bug report logs -
#31236
[PATCH] Fix pre- and post-command-hook errors in term.el
Previous Next
Reported by: Karl Otness <karl <at> karlotness.com>
Date: Sun, 22 Apr 2018 05:41:02 UTC
Severity: normal
Tags: patch
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Bug and proposed fix confirmed and tested here.
This was an oversight on my part from #24837.
The suggested patch seems sensible to me. If others agree, I think
this should be committed to the emacs-26 branch.
-Phil
On 2018-04-22 15:41, Karl Otness wrote:
> As far as I can tell there isn't an existing bug report for this
> issue. It is very minor but I have attached a fix. This affects Emacs
> 26.1-rc1 `term' and `ansi-term'. In char mode term installs functions
> in both pre- and post-command-hooks. After the process exits both of
> these hooks produce errors and then are removed by Emacs after
> printing a message.
>
> Both of these hooks are re-installed when entering char mode and
> removing them if they are not present will do nothing. To produce this
> change, I took the remove-hook lines used when entering line mode and
> placed them in `term-handle-exit'.
>
> To reproduce the issue in 26.1, M-x term, exit the running process and
> execute any command (i.e. move point). In *Messages* there should be
> the following lines:
>
> Error in pre-command-hook (term-set-goto-process-mark):
> (wrong-type-argument processp nil)
> Error in post-command-hook (term-goto-process-mark-maybe):
> (wrong-type-argument processp nil)
>
> The error seems to come up from `process-mark'. After this change,
> these errors no longer appear as the hooks are removed. I have
> attached a patch which applies this change to current master.
>
> Thank you,
> Karl
This bug report was last modified 7 years and 83 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.