help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: count all ispell(flyspell) errors in a buffer


From: Emanuel Berg
Subject: Re: count all ispell(flyspell) errors in a buffer
Date: Mon, 27 Nov 2023 00:53:59 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Uwe Brauer wrote:

> I usually use flyspell on most of my buffers, but sometimes
> are interested to run ispell-region.
>
> Is there any way to find out how many errors ispell finds
> when the program starts

You can use this

(condition-case nil
    (not (ispell-word))
  (error nil) )

It returns t if the word is correct, otherwise nil.

Put in a loop that iterates all the words in the region with
`forward-word'.

For every word that is nil, do `cl-incf' on some error
variable that is initiated to 0.

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]