From 754a6ed8e9bbe7dd46e0d4595d8e46b76dc5b606 Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Fri, 27 Dec 2019 12:48:55 +0100 Subject: [PATCH] Improve error message when no spellchecker can be found * lisp/emacs-lisp/checkdoc.el: Throw error when (checkdoc-ispell-init) fails configuring ispell. --- lisp/emacs-lisp/checkdoc.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 3e6542bc80..0269b89790 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -2127,6 +2127,9 @@ checkdoc-ispell-docstring-engine (and checkdoc-autofix-flag (not (eq checkdoc-autofix-flag 'never))))) (checkdoc-ispell-init) + (unless checkdoc-spellcheck-documentation-flag + ;; this happens when (checkdoc-ispell-init) can't start `ispell-program-name' + (user-error "No spellchecker installed: check the variable `ispell-program-name'.")) (save-excursion (skip-chars-forward "^a-zA-Z") (let (word sym case-fold-search err word-beginning word-end) -- 2.24.1