aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/textmodes
diff options
context:
space:
mode:
authorIan W2021-09-03 20:53:24 -0700
committerEli Zaretskii2021-09-05 10:25:22 +0300
commitba84ec8bd93b931be975ab8a8a7f0d7a2df7054a (patch)
tree56be0ad7edd57b85d51c9b42cd43b0af23e6bf10 /lisp/textmodes
parente6f936eb4d28bf23eb367d4245a137284d5491ee (diff)
downloademacs-ba84ec8bd93b931be975ab8a8a7f0d7a2df7054a.tar.gz
emacs-ba84ec8bd93b931be975ab8a8a7f0d7a2df7054a.zip
Fix error handling in 'ispell-init-process'
* lisp/textmodes/ispell.el (ispell-init-process): When Ispell initialization reports an error, call 'ispell-accept-output' only if the Ispell process is still alive. (Bug#50370) Copyright-paperwork-exempt: yes
Diffstat (limited to 'lisp/textmodes')
-rw-r--r--lisp/textmodes/ispell.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index c2f6b35df89..3b9f1d35129 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -2923,7 +2923,14 @@ Keeps argument list for future Ispell invocations for no async support."
2923 ;; But first wait to see if some more output is going to arrive. 2923 ;; But first wait to see if some more output is going to arrive.
2924 ;; Otherwise we get cool errors like "Can't open ". 2924 ;; Otherwise we get cool errors like "Can't open ".
2925 (sleep-for 1) 2925 (sleep-for 1)
2926 (ispell-accept-output 3) 2926 ;; Only call `ispell-accept-output' if the Ispell process
2927 ;; is alive, to avoid showing an unhelpful error message
2928 ;; about a missing process, instead of the error which
2929 ;; reports why the Ispell process died.
2930 (when (if ispell-async-processp
2931 (process-live-p ispell-process)
2932 ispell-process)
2933 (ispell-accept-output 3))
2927 (error "%s" (mapconcat #'identity ispell-filter "\n")))) 2934 (error "%s" (mapconcat #'identity ispell-filter "\n"))))
2928 (setq ispell-filter nil) ; Discard version ID line 2935 (setq ispell-filter nil) ; Discard version ID line
2929 (let ((extended-char-mode (ispell-get-extended-character-mode))) 2936 (let ((extended-char-mode (ispell-get-extended-character-mode)))