Changeset 4166 for trunk/lisp/textmodes/flyspell.el
- Timestamp:
- 2006年09月18日 20時48分14秒 (2 years ago)
- Files:
-
- trunk/lisp/textmodes/flyspell.el (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lisp/textmodes/flyspell.el
r4098 r4166 993 993 (let* ((cursor-location (point)) 994 994 (flyspell-word (flyspell-get-word following)) 995 start end poss word )995 start end poss word ispell-filter) 996 996 (if (or (eq flyspell-word nil) 997 997 (and (fboundp flyspell-generic-check-word-predicate) … … 1051 1051 ;; (ispell-send-string "!\n") 1052 1052 ;; back to terse mode. 1053 ;; Remove leading empty element 1053 1054 (setq ispell-filter (cdr ispell-filter)) 1055 ;; ispell process should return something after word is sent. 1056 ;; Tag word as valid (i.e., skip) otherwise 1057 (or ispell-filter 1058 (setq ispell-filter '(*))) 1054 1059 (if (consp ispell-filter) 1055 1060 (setq poss (ispell-parse-output (car ispell-filter)))) … … 1456 1461 (delete-region (match-beginning 0) (match-end 0))))))))) 1457 1462 1463 ;;* --------------------------------------------------------------- 1464 ;;* flyspell-check-region-doublons 1465 ;;* --------------------------------------------------------------- 1466 (defun flyspell-check-region-doublons (beg end) 1467 "Check for adjacent duplicated words (doublons) in the given region." 1468 (save-excursion 1469 (goto-char beg) 1470 (flyspell-word) ; Make sure current word is checked 1471 (backward-word 1) 1472 (while (and (< (point) end) 1473 (re-search-forward "\\b\\([^ \n\t]+\\)[ \n\t]+\\1\\b" 1474 end 'move)) 1475 (flyspell-word) 1476 (backward-word 1)) 1477 (flyspell-word))) 1478 1458 1479 ;;*---------------------------------------------------------------------*/ 1459 1480 ;;* flyspell-large-region ... */ … … 1500 1521 (flyspell-process-localwords buffer) 1501 1522 (with-current-buffer curbuf 1502 (flyspell-delete-region-overlays beg end)) 1523 (flyspell-delete-region-overlays beg end) 1524 (flyspell-check-region-doublons beg end)) 1503 1525 (flyspell-external-point-words)) 1504 1526 (error "Can't check region..."))))) … … 1831 1853 (end (car (cdr (cdr word)))) 1832 1854 (word (car word)) 1833 poss )1855 poss ispell-filter) 1834 1856 (setq flyspell-auto-correct-word word) 1835 1857 ;; now check spelling of word. … … 1840 1862 (accept-process-output ispell-process) 1841 1863 (not (string= "" (car ispell-filter))))) 1864 ;; Remove leading empty element 1842 1865 (setq ispell-filter (cdr ispell-filter)) 1866 ;; ispell process should return something after word is sent. 1867 ;; Tag word as valid (i.e., skip) otherwise 1868 (or ispell-filter 1869 (setq ispell-filter '(*))) 1843 1870 (if (consp ispell-filter) 1844 1871 (setq poss (ispell-parse-output (car ispell-filter)))) … … 1981 2008 (end (car (cdr (cdr word)))) 1982 2009 (word (car word)) 1983 poss )2010 poss ispell-filter) 1984 2011 ;; now check spelling of word. 1985 2012 (ispell-send-string "%\n") ;put in verbose mode … … 1989 2016 (accept-process-output ispell-process) 1990 2017 (not (string= "" (car ispell-filter))))) 2018 ;; Remove leading empty element 1991 2019 (setq ispell-filter (cdr ispell-filter)) 2020 ;; ispell process should return something after word is sent. 2021 ;; Tag word as valid (i.e., skip) otherwise 2022 (or ispell-filter 2023 (setq ispell-filter '(*))) 1992 2024 (if (consp ispell-filter) 1993 2025 (setq poss (ispell-parse-output (car ispell-filter))))
