[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/textmodes/flyspell.el,v
From: |
Michael Cadilhac |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/textmodes/flyspell.el,v |
Date: |
Fri, 31 Aug 2007 13:41:24 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Michael Cadilhac <cadilhac> 07/08/31 13:41:24
Index: flyspell.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/textmodes/flyspell.el,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -b -r1.122 -r1.123
--- flyspell.el 13 Aug 2007 13:40:48 -0000 1.122
+++ flyspell.el 31 Aug 2007 13:41:23 -0000 1.123
@@ -67,11 +67,21 @@
(defcustom flyspell-mark-duplications-flag t
"Non-nil means Flyspell reports a repeated word as an error.
+See `flyspell-mark-duplications-exceptions' to add exceptions to this rule.
Detection of repeated words is not implemented in
\"large\" regions; see `flyspell-large-region'."
:group 'flyspell
:type 'boolean)
+(defcustom flyspell-mark-duplications-exceptions
+ '(("francais" . ("nous" "vous")))
+ "A list of exceptions for duplicated words.
+It should be a list of (LANGUAGE . EXCEPTION-LIST). LANGUAGE is matched
+against the current dictionary and EXCEPTION-LIST is a list of strings.
+The duplicated word is downcased before it is compared with the exceptions."
+ :group 'flyspell
+ :type '(alist :key-type string :value-type (repeat string)))
+
(defcustom flyspell-sort-corrections nil
"Non-nil means, sort the corrections alphabetically before popping them."
:group 'flyspell
@@ -1022,6 +1032,13 @@
(and (> start (point-min))
(not (memq (char-after (1- start)) '(?\} ?\\)))))
flyspell-mark-duplications-flag
+ (not (catch 'exception
+ (dolist (except flyspell-mark-duplications-exceptions)
+ (and (string= (or ispell-local-dictionary
+ ispell-dictionary)
+ (car except))
+ (member (downcase word) (cdr except))
+ (throw 'exception t)))))
(save-excursion
(goto-char start)
(let* ((bound