Mercurial > emacs
comparison lisp/textmodes/flyspell.el @ 90233:ee12d75eb214
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-85
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 556-561)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 122-124)
- Update from CVS: lisp/mm-url.el (mm-url-decode-entities): Fix regexp.
- Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sun, 25 Sep 2005 22:07:01 +0000 |
parents | fa0da9b57058 f621d74f5b9a |
children | aa89c814f853 |
comparison
equal
deleted
inserted
replaced
90232:eab32348047a | 90233:ee12d75eb214 |
---|---|
167 :group 'flyspell | 167 :group 'flyspell |
168 :type 'boolean) | 168 :type 'boolean) |
169 | 169 |
170 (defcustom flyspell-incorrect-hook nil | 170 (defcustom flyspell-incorrect-hook nil |
171 "*List of functions to be called when incorrect words are encountered. | 171 "*List of functions to be called when incorrect words are encountered. |
172 Each function is given three arguments: the beginning and the end | 172 Each function is given three arguments. The first two |
173 of the incorrect region. The third is either the symbol 'doublon' or the list | 173 arguments are the beginning and the end of the incorrect region. |
174 The third is either the symbol `doublon' or the list | |
174 of possible corrections as returned by `ispell-parse-output'. | 175 of possible corrections as returned by `ispell-parse-output'. |
175 | 176 |
176 If any of the functions return non-Nil, the word is not highlighted as | 177 If any of the functions return non-nil, the word is not highlighted as |
177 incorrect." | 178 incorrect." |
178 :group 'flyspell | 179 :group 'flyspell |
179 :version "21.1" | 180 :version "21.1" |
180 :type 'hook) | 181 :type 'hook) |
181 | 182 |
1084 (goto-char end) | 1085 (goto-char end) |
1085 (flyspell-word-search-forward | 1086 (flyspell-word-search-forward |
1086 word | 1087 word |
1087 (+ end | 1088 (+ end |
1088 flyspell-duplicate-distance)))))) | 1089 flyspell-duplicate-distance)))))) |
1090 ;; This is a misspelled word which occurs | |
1091 ;; twice within flyspell-duplicate-distance. | |
1089 (setq flyspell-word-cache-result nil) | 1092 (setq flyspell-word-cache-result nil) |
1090 (if flyspell-highlight-flag | 1093 (if flyspell-highlight-flag |
1091 (flyspell-highlight-duplicate-region | 1094 (flyspell-highlight-duplicate-region |
1092 start end poss) | 1095 start end poss) |
1093 (message "duplicate `%s'" word)) | 1096 (message "duplicate `%s'" word)) |
1557 | 1560 |
1558 ;*---------------------------------------------------------------------*/ | 1561 ;*---------------------------------------------------------------------*/ |
1559 ;* flyspell-highlight-incorrect-region ... */ | 1562 ;* flyspell-highlight-incorrect-region ... */ |
1560 ;*---------------------------------------------------------------------*/ | 1563 ;*---------------------------------------------------------------------*/ |
1561 (defun flyspell-highlight-incorrect-region (beg end poss) | 1564 (defun flyspell-highlight-incorrect-region (beg end poss) |
1562 "Set up an overlay on a misspelled word, in the buffer from BEG to END." | 1565 "Set up an overlay on a misspelled word, in the buffer from BEG to END. |
1566 POSS is usually a list of possible spelling/correction lists, | |
1567 as returned by `ispell-parse-output'. | |
1568 It can also be the symbol `doublon', in the case where the word | |
1569 is itself incorrect, but suspiciously repeated." | |
1563 (let ((inhibit-read-only t)) | 1570 (let ((inhibit-read-only t)) |
1564 (unless (run-hook-with-args-until-success | 1571 (unless (run-hook-with-args-until-success |
1565 'flyspell-incorrect-hook beg end poss) | 1572 'flyspell-incorrect-hook beg end poss) |
1566 (if (or flyspell-highlight-properties | 1573 (if (or flyspell-highlight-properties |
1567 (not (flyspell-properties-at-p beg))) | 1574 (not (flyspell-properties-at-p beg))) |
1590 | 1597 |
1591 ;*---------------------------------------------------------------------*/ | 1598 ;*---------------------------------------------------------------------*/ |
1592 ;* flyspell-highlight-duplicate-region ... */ | 1599 ;* flyspell-highlight-duplicate-region ... */ |
1593 ;*---------------------------------------------------------------------*/ | 1600 ;*---------------------------------------------------------------------*/ |
1594 (defun flyspell-highlight-duplicate-region (beg end poss) | 1601 (defun flyspell-highlight-duplicate-region (beg end poss) |
1595 "Set up an overlay on a duplicated word, in the buffer from BEG to END. | 1602 "Set up an overlay on a duplicate misspelled word, in the buffer from BEG to END. |
1596 ??? What does POSS mean?" | 1603 POSS is a list of possible spelling/correction lists, |
1604 as returned by `ispell-parse-output'." | |
1597 (let ((inhibit-read-only t)) | 1605 (let ((inhibit-read-only t)) |
1598 (unless (run-hook-with-args-until-success | 1606 (unless (run-hook-with-args-until-success |
1599 'flyspell-incorrect-hook beg end poss) | 1607 'flyspell-incorrect-hook beg end poss) |
1600 (if (or flyspell-highlight-properties | 1608 (if (or flyspell-highlight-properties |
1601 (not (flyspell-properties-at-p beg))) | 1609 (not (flyspell-properties-at-p beg))) |