[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master ba84ec8: Fix error handling in 'ispell-init-process'
From: |
Eli Zaretskii |
Subject: |
master ba84ec8: Fix error handling in 'ispell-init-process' |
Date: |
Sun, 5 Sep 2021 03:27:16 -0400 (EDT) |
branch: master
commit ba84ec8bd93b931be975ab8a8a7f0d7a2df7054a
Author: Ian W <ian@wahbe.com>
Commit: Eli Zaretskii <eliz@gnu.org>
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
---
lisp/textmodes/ispell.el | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index c2f6b35..3b9f1d3 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."
;; But first wait to see if some more output is going to arrive.
;; Otherwise we get cool errors like "Can't open ".
(sleep-for 1)
- (ispell-accept-output 3)
+ ;; Only call `ispell-accept-output' if the Ispell process
+ ;; is alive, to avoid showing an unhelpful error message
+ ;; about a missing process, instead of the error which
+ ;; reports why the Ispell process died.
+ (when (if ispell-async-processp
+ (process-live-p ispell-process)
+ ispell-process)
+ (ispell-accept-output 3))
(error "%s" (mapconcat #'identity ispell-filter "\n"))))
(setq ispell-filter nil) ; Discard version ID line
(let ((extended-char-mode (ispell-get-extended-character-mode)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master ba84ec8: Fix error handling in 'ispell-init-process',
Eli Zaretskii <=