Show
Ignore:
Timestamp:
2006年09月18日 20時48分14秒 (2 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/textmodes/flyspell.el

    r4098 r4166  
    993993    (let* ((cursor-location (point)) 
    994994           (flyspell-word (flyspell-get-word following)) 
    995            start end poss word
     995           start end poss word ispell-filter
    996996      (if (or (eq flyspell-word nil) 
    997997              (and (fboundp flyspell-generic-check-word-predicate) 
     
    10511051            ;; (ispell-send-string "!\n") 
    10521052            ;; back to terse mode. 
     1053            ;; Remove leading empty element 
    10531054            (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 '(*))) 
    10541059            (if (consp ispell-filter) 
    10551060                (setq poss (ispell-parse-output (car ispell-filter)))) 
     
    14561461              (delete-region (match-beginning 0) (match-end 0))))))))) 
    14571462 
     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 
    14581479;;*---------------------------------------------------------------------*/ 
    14591480;;*    flyspell-large-region ...                                        */ 
     
    15001521            (flyspell-process-localwords buffer) 
    15011522            (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)) 
    15031525            (flyspell-external-point-words)) 
    15041526        (error "Can't check region..."))))) 
     
    18311853                  (end (car (cdr (cdr word)))) 
    18321854                  (word (car word)) 
    1833                   poss
     1855                  poss ispell-filter
    18341856              (setq flyspell-auto-correct-word word) 
    18351857              ;; now check spelling of word. 
     
    18401862                       (accept-process-output ispell-process) 
    18411863                       (not (string= "" (car ispell-filter))))) 
     1864              ;; Remove leading empty element 
    18421865              (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 '(*))) 
    18431870              (if (consp ispell-filter) 
    18441871                  (setq poss (ispell-parse-output (car ispell-filter)))) 
     
    19812008                (end (car (cdr (cdr word)))) 
    19822009                (word (car word)) 
    1983                 poss
     2010                poss ispell-filter
    19842011            ;; now check spelling of word. 
    19852012            (ispell-send-string "%\n") ;put in verbose mode 
     
    19892016                     (accept-process-output ispell-process) 
    19902017                     (not (string= "" (car ispell-filter))))) 
     2018            ;; Remove leading empty element 
    19912019            (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 '(*))) 
    19922024            (if (consp ispell-filter) 
    19932025                (setq poss (ispell-parse-output (car ispell-filter))))