mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-01 21:30:54 -08:00
This commit makes checkdoc capable of spell-checking even when the user isn't using it interactively. When TAKE-NOTES is non-nil, checkdoc will run spell-checking (with ispell) and report spelling mistakes. Fixes: (bug#38583). * lisp/textmodes/ispell.el (ispell-word): Extract part of it to `ispell--run-on-word`. (ispell--run-on-word): New function, extracted from `ispell-word`. (ispell-error-checking-word): New function. (ispell-correct-p): New function. Use `ispell--run-on-word` and `ispell-error-checking-word`. * lisp/emacs-lisp/checkdoc.el (checkdoc-current-buffer): Pass TAKE-NOTES to `checkdoc-start`. (checkdoc-continue): Pass TAKE-NOTES to `checkdoc-this-string-valid`. (checkdoc-this-string-valid): Add optional argument TAKE-NOTES and pass it to `checkdoc-this-string-valid-engine`. (checkdoc-this-string-valid-engine): Add optional argument TAKE-NOTES and pass it to `checkdoc-ispell-docstring-engine`. (checkdoc-ispell-init): Call `ispell-set-spellchecker-params` and `ispell-accept-buffer-local-defs`. These calls are required to properly use ispell. The problem went unnoticed until now because checkdoc was only using ispell through the high-level command `ispell-word` which takes care of all the initialization for the user. (checkdoc-ispell-docstring-engine): Add optional argument TAKE-NOTES to force reporting of spell-checking errors. Throw error when (checkdoc-ispell-init) fails configuring ispell. Replace a few (if cond nil body) with (unless cond body). Replace (let ((var nil))) with (let (var)). Replace (if (not (eq checkdoc-autofix-flag 'never)) body) with just body because `checkdoc-autofix-flag` is checked at the beginning of the function. |
||
|---|---|---|
| .. | ||
| artist.el | ||
| bib-mode.el | ||
| bibtex-style.el | ||
| bibtex.el | ||
| conf-mode.el | ||
| css-mode.el | ||
| dns-mode.el | ||
| enriched.el | ||
| fill.el | ||
| flyspell.el | ||
| ispell.el | ||
| less-css-mode.el | ||
| makeinfo.el | ||
| mhtml-mode.el | ||
| nroff-mode.el | ||
| page-ext.el | ||
| page.el | ||
| paragraphs.el | ||
| picture.el | ||
| po.el | ||
| refbib.el | ||
| refer.el | ||
| refill.el | ||
| reftex-auc.el | ||
| reftex-cite.el | ||
| reftex-dcr.el | ||
| reftex-global.el | ||
| reftex-index.el | ||
| reftex-parse.el | ||
| reftex-ref.el | ||
| reftex-sel.el | ||
| reftex-toc.el | ||
| reftex-vars.el | ||
| reftex.el | ||
| remember.el | ||
| rst.el | ||
| sgml-mode.el | ||
| table.el | ||
| tex-mode.el | ||
| texinfmt.el | ||
| texinfo.el | ||
| texnfo-upd.el | ||
| text-mode.el | ||
| tildify.el | ||
| two-column.el | ||
| underline.el | ||