Subject: bug#33115: 27.0.50; Add error-handling for comint-strip-ctrl-m

From: Eli Zaretskii <[email-masked]>
Date: Sat, 27 Oct 2018 12:31:04 +0300

> From: Live System User <[email-masked]>
> Date: Sun, 21 Oct 2018 22:51:46 -0400
> 
>         Please consider adding additional error-handling for
>         `comint-strip-ctrl-m'.
> 
>         Amongst other things, I set the following hook:
> 
> 
> (add-hook 'comint-output-filter-functions 'comint-strip-ctrl-m)
> 
> 
>         In my setup (i.e. NOT emacs -Q) I get the following
>         error when exiting a *shell* process:
> 
> 
> Debugger entered--Lisp error: (wrong-type-argument processp nil)
>   process-mark(nil)
>   comint-strip-ctrl-m("")
>   run-hook-with-args(comint-strip-ctrl-m "")
>   comint-send-input()
>   funcall-interactively(comint-send-input)
>   call-interactively(comint-send-input nil nil)
>   command-execute(comint-send-input)

Since this function is also an interactive command, I think it should
only silently do nothing when invoked non-interactively.
Interactively, invoking it on a process that was deleted should signal
an error.