diff options
author | Reuben Thomas <rrt@sc3d.org> | 2018-09-10 15:06:02 +0100 |
---|---|---|
committer | Reuben Thomas <rrt@sc3d.org> | 2018-09-10 15:06:02 +0100 |
commit | 61f3a4b4fcc43241caaac63195205774ab1a5732 (patch) | |
tree | 3442d00358cf5fdf43501fdc917484fa696c57d6 /lisp/textmodes/flyspell.el | |
parent | 80ca2b81097520164e002c04a25813996d3aeb54 (diff) | |
download | emacs-61f3a4b4fcc43241caaac63195205774ab1a5732.tar.gz |
Add flyspell option to ignore duplicates of different case
* lisp/textmodes/flyspell.el (flyspell-case-fold-duplications): Add
option.
Diffstat (limited to 'lisp/textmodes/flyspell.el')
-rw-r--r-- | lisp/textmodes/flyspell.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index f6a809b18ee..e5a7639e204 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -68,6 +68,12 @@ Detection of repeated words is not implemented in :group 'flyspell :type 'boolean) +(defcustom flyspell-case-fold-duplications t + "Non-nil means Flyspell matches duplicate words case-insensitively." + :group 'flyspell + :type 'boolean + :version 27.1) + (defcustom flyspell-mark-duplications-exceptions '((nil . ("that" "had")) ; Common defaults for English. ("\\`francais" . ("nous" "vous"))) @@ -1154,7 +1160,8 @@ spell-check." (- (save-excursion (skip-chars-backward " \t\n\f"))))) (p (when (>= bound (point-min)) - (flyspell-word-search-backward word bound t)))) + (flyspell-word-search-backward + word bound flyspell-case-fold-duplications)))) (and p (/= p start))))) ;; yes, this is a doublon (flyspell-highlight-incorrect-region start end 'doublon) |