Function: ispell-correct-p

ispell-correct-p is a byte-compiled function defined in ispell.el.gz.

Signature

(ispell-correct-p &optional FOLLOWING)

Documentation

Return t if the word at point is correct, nil otherwise.

If optional argument FOLLOWING is non-nil then the following word (rather than preceding) is checked when the cursor is not over a word.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/ispell.el.gz
(defun ispell-correct-p (&optional following)
  "Return t if the word at point is correct, nil otherwise.

If optional argument FOLLOWING is non-nil then the following
word (rather than preceding) is checked when the cursor is not
over a word."
  (save-excursion
    ;; Reset ispell-filter so it only contains the result of
    ;; spell-checking the current-word:
    (setq ispell-filter nil)
    (let* ((word-and-boundaries (ispell-get-word following))
           (word (car word-and-boundaries))
           (poss (ispell--run-on-word word)))
      (unless poss (error (ispell-error-checking-word word)))
      (or (eq poss t)
          (stringp poss)))))