diff options
| author | Richard M. Stallman | 2005-10-28 04:22:19 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-10-28 04:22:19 +0000 |
| commit | ca7250cb5a7fdd3e1c93426e626c8a82872c79eb (patch) | |
| tree | 99febababb2da4d152cd85b891c8d5e5cb902e59 | |
| parent | 93e7f889422e0d4475cd0ef248470e4125067f32 (diff) | |
| download | emacs-ca7250cb5a7fdd3e1c93426e626c8a82872c79eb.tar.gz emacs-ca7250cb5a7fdd3e1c93426e626c8a82872c79eb.zip | |
(flyspell-large-region): Pass -t if Tex file.
(flyspell-external-point-words): Error if misspelled word is not found.
Set flyspell-large-region-beg at end of word.
| -rw-r--r-- | lisp/textmodes/flyspell.el | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index a876593e738..ee94ff01d64 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el | |||
| @@ -1333,7 +1333,7 @@ The buffer to mark them in is `flyspell-large-region-buffer'." | |||
| 1333 | ;; Loop over incorrect words. | 1333 | ;; Loop over incorrect words. |
| 1334 | (while (re-search-forward "\\([^\n]+\\)\n" (point-max) t) | 1334 | (while (re-search-forward "\\([^\n]+\\)\n" (point-max) t) |
| 1335 | ;; Bind WORD to the next one. | 1335 | ;; Bind WORD to the next one. |
| 1336 | (let ((word (match-string 1))) | 1336 | (let ((word (match-string 1)) (wordpos (point))) |
| 1337 | ;; Here there used to be code to see if WORD is the same | 1337 | ;; Here there used to be code to see if WORD is the same |
| 1338 | ;; as the previous iteration, and count the number of consecutive | 1338 | ;; as the previous iteration, and count the number of consecutive |
| 1339 | ;; identical words, and the loop below would search for that many. | 1339 | ;; identical words, and the loop below would search for that many. |
| @@ -1350,11 +1350,15 @@ The buffer to mark them in is `flyspell-large-region-buffer'." | |||
| 1350 | (with-current-buffer flyspell-large-region-buffer | 1350 | (with-current-buffer flyspell-large-region-buffer |
| 1351 | (goto-char flyspell-large-region-beg) | 1351 | (goto-char flyspell-large-region-beg) |
| 1352 | (let ((keep t)) | 1352 | (let ((keep t)) |
| 1353 | (while (and keep | 1353 | (while keep |
| 1354 | (search-forward word flyspell-large-region-end t)) | 1354 | (if (search-forward word |
| 1355 | (goto-char (- (point) 1)) | 1355 | flyspell-large-region-end t) |
| 1356 | (setq keep (flyspell-word))) | 1356 | (progn |
| 1357 | (setq flyspell-large-region-beg (point)))))) | 1357 | (setq flyspell-large-region-beg (point)) |
| 1358 | (goto-char (- (point) 1)) | ||
| 1359 | (setq keep (flyspell-word))) | ||
| 1360 | (error "Bug: misspelled word `%s' (output pos %d) not found in buffer" | ||
| 1361 | word wordpos))))))) | ||
| 1358 | ;; we are done | 1362 | ;; we are done |
| 1359 | (if flyspell-issue-message-flag (message "Spell Checking completed."))) | 1363 | (if flyspell-issue-message-flag (message "Spell Checking completed."))) |
| 1360 | ;; Kill and forget the buffer with the list of incorrect words. | 1364 | ;; Kill and forget the buffer with the list of incorrect words. |
| @@ -1389,6 +1393,8 @@ The buffer to mark them in is `flyspell-large-region-buffer'." | |||
| 1389 | (if ispell-local-dictionary | 1393 | (if ispell-local-dictionary |
| 1390 | (setq ispell-dictionary ispell-local-dictionary)) | 1394 | (setq ispell-dictionary ispell-local-dictionary)) |
| 1391 | (setq args (ispell-get-ispell-args)) | 1395 | (setq args (ispell-get-ispell-args)) |
| 1396 | (if (eq ispell-parser 'tex) | ||
| 1397 | (setq args (cons "-t" args))) | ||
| 1392 | (if ispell-dictionary ; use specified dictionary | 1398 | (if ispell-dictionary ; use specified dictionary |
| 1393 | (setq args | 1399 | (setq args |
| 1394 | (append (list "-d" ispell-dictionary) args))) | 1400 | (append (list "-d" ispell-dictionary) args))) |