flyspell-duplicate-distance

flyspell-duplicate-distance is a variable defined in `flyspell.el'.
Its value is
-1


Documentation:
The maximum distance for finding duplicates of unrecognized words.
This applies to the feature that when a word is not found in the dictionary,
if the same spelling occurs elsewhere in the buffer,
Flyspell uses a different face (`flyspell-duplicate') to highlight it.
This variable specifies how far to search to find such a duplicate.
-1 means no limit (search the whole buffer).
0 means do not search for duplicate unrecognized spellings.

You can customize this variable.

This variable was introduced, or its default value was changed, in version 21.1 of Emacs.