diff options
| -rw-r--r-- | lisp/textmodes/flyspell.el | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 6cd884474f0..de303b7f0d8 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el | |||
| @@ -33,14 +33,15 @@ | |||
| 33 | ;; To enable Flyspell in text representing computer programs, type | 33 | ;; To enable Flyspell in text representing computer programs, type |
| 34 | ;; M-x flyspell-prog-mode. | 34 | ;; M-x flyspell-prog-mode. |
| 35 | ;; In that mode only text inside comments is checked. | 35 | ;; In that mode only text inside comments is checked. |
| 36 | ;; | 36 | ;; |
| 37 | ;; Note: consider setting the variable ispell-parser to `tex' to | 37 | ;; Note: consider setting the variable ispell-parser to `tex' to |
| 38 | ;; avoid TeX command checking; use `(setq ispell-parser 'tex)'. | 38 | ;; avoid TeX command checking; use `(setq ispell-parser 'tex)'. |
| 39 | ;; | 39 | ;; |
| 40 | ;; Some user variables control the behavior of flyspell. They are | 40 | ;; Some user variables control the behavior of flyspell. They are |
| 41 | ;; those defined under the `User variables' comment. | 41 | ;; those defined under the `User variables' comment. |
| 42 | 42 | ||
| 43 | ;;; Code: | 43 | ;;; Code: |
| 44 | |||
| 44 | (require 'ispell) | 45 | (require 'ispell) |
| 45 | 46 | ||
| 46 | ;*---------------------------------------------------------------------*/ | 47 | ;*---------------------------------------------------------------------*/ |
| @@ -203,7 +204,7 @@ http://strw.leidenuniv.nl/~dominik/Tools" | |||
| 203 | :group 'flyspell | 204 | :group 'flyspell |
| 204 | :version "21.1" | 205 | :version "21.1" |
| 205 | :type 'boolean) | 206 | :type 'boolean) |
| 206 | 207 | ||
| 207 | ;;;###autoload | 208 | ;;;###autoload |
| 208 | (defcustom flyspell-mode-line-string " Fly" | 209 | (defcustom flyspell-mode-line-string " Fly" |
| 209 | "*String displayed on the modeline when flyspell is active. | 210 | "*String displayed on the modeline when flyspell is active. |
| @@ -422,7 +423,7 @@ Ispell is automatically spawned on background for each entered words. | |||
| 422 | The default flyspell behavior is to highlight incorrect words. | 423 | The default flyspell behavior is to highlight incorrect words. |
| 423 | With no argument, this command toggles Flyspell mode. | 424 | With no argument, this command toggles Flyspell mode. |
| 424 | With a prefix argument ARG, turn Flyspell minor mode on iff ARG is positive. | 425 | With a prefix argument ARG, turn Flyspell minor mode on iff ARG is positive. |
| 425 | 426 | ||
| 426 | Bindings: | 427 | Bindings: |
| 427 | \\[ispell-word]: correct words (using Ispell). | 428 | \\[ispell-word]: correct words (using Ispell). |
| 428 | \\[flyspell-auto-correct-word]: automatically correct word. | 429 | \\[flyspell-auto-correct-word]: automatically correct word. |
| @@ -472,7 +473,7 @@ in your .emacs file. | |||
| 472 | ;* For remembering buffers running flyspell */ | 473 | ;* For remembering buffers running flyspell */ |
| 473 | ;*---------------------------------------------------------------------*/ | 474 | ;*---------------------------------------------------------------------*/ |
| 474 | (defvar flyspell-buffers nil) | 475 | (defvar flyspell-buffers nil) |
| 475 | 476 | ||
| 476 | ;*---------------------------------------------------------------------*/ | 477 | ;*---------------------------------------------------------------------*/ |
| 477 | ;* flyspell-minibuffer-p ... */ | 478 | ;* flyspell-minibuffer-p ... */ |
| 478 | ;*---------------------------------------------------------------------*/ | 479 | ;*---------------------------------------------------------------------*/ |
| @@ -488,7 +489,7 @@ in your .emacs file. | |||
| 488 | (ispell-accept-buffer-local-defs) | 489 | (ispell-accept-buffer-local-defs) |
| 489 | (if (not (and (eq flyspell-dash-dictionary ispell-dictionary) | 490 | (if (not (and (eq flyspell-dash-dictionary ispell-dictionary) |
| 490 | (eq flyspell-dash-local-dictionary ispell-local-dictionary))) | 491 | (eq flyspell-dash-local-dictionary ispell-local-dictionary))) |
| 491 | ;; the dictionary as changed | 492 | ;; the dictionary has changed |
| 492 | (progn | 493 | (progn |
| 493 | (setq flyspell-dash-dictionary ispell-dictionary) | 494 | (setq flyspell-dash-dictionary ispell-dictionary) |
| 494 | (setq flyspell-dash-local-dictionary ispell-local-dictionary) | 495 | (setq flyspell-dash-local-dictionary ispell-local-dictionary) |
| @@ -767,7 +768,7 @@ Mostly we check word delimiters." | |||
| 767 | (insert (format " cache-start: %S\n" flyspell-word-cache-start)) | 768 | (insert (format " cache-start: %S\n" flyspell-word-cache-start)) |
| 768 | (insert (format " cache-end : %S\n" flyspell-word-cache-end)) | 769 | (insert (format " cache-end : %S\n" flyspell-word-cache-end)) |
| 769 | (goto-char (point-max))))) | 770 | (goto-char (point-max))))) |
| 770 | 771 | ||
| 771 | ;*---------------------------------------------------------------------*/ | 772 | ;*---------------------------------------------------------------------*/ |
| 772 | ;* flyspell-debug-signal-word-checked ... */ | 773 | ;* flyspell-debug-signal-word-checked ... */ |
| 773 | ;*---------------------------------------------------------------------*/ | 774 | ;*---------------------------------------------------------------------*/ |
| @@ -1106,7 +1107,7 @@ this function changes the last char of the `ispell-casechars' string." | |||
| 1106 | (setq flyspell-ispell-casechars-cache ispell-casechars) | 1107 | (setq flyspell-ispell-casechars-cache ispell-casechars) |
| 1107 | (setq flyspell-casechars-cache ispell-casechars) | 1108 | (setq flyspell-casechars-cache ispell-casechars) |
| 1108 | flyspell-casechars-cache)))) | 1109 | flyspell-casechars-cache)))) |
| 1109 | 1110 | ||
| 1110 | ;*---------------------------------------------------------------------*/ | 1111 | ;*---------------------------------------------------------------------*/ |
| 1111 | ;* flyspell-get-not-casechars-cache ... */ | 1112 | ;* flyspell-get-not-casechars-cache ... */ |
| 1112 | ;*---------------------------------------------------------------------*/ | 1113 | ;*---------------------------------------------------------------------*/ |
| @@ -1269,7 +1270,7 @@ Word syntax described by `ispell-dictionary-alist' (which see)." | |||
| 1269 | ;; have to kill the temporary buffer | 1270 | ;; have to kill the temporary buffer |
| 1270 | (kill-buffer flyspell-external-ispell-buffer) | 1271 | (kill-buffer flyspell-external-ispell-buffer) |
| 1271 | (setq flyspell-external-ispell-buffer nil))) | 1272 | (setq flyspell-external-ispell-buffer nil))) |
| 1272 | 1273 | ||
| 1273 | ;*---------------------------------------------------------------------*/ | 1274 | ;*---------------------------------------------------------------------*/ |
| 1274 | ;* flyspell-large-region ... */ | 1275 | ;* flyspell-large-region ... */ |
| 1275 | ;*---------------------------------------------------------------------*/ | 1276 | ;*---------------------------------------------------------------------*/ |
| @@ -1458,7 +1459,7 @@ for the overlay." | |||
| 1458 | flyspell-overlay-keymap-property-name | 1459 | flyspell-overlay-keymap-property-name |
| 1459 | flyspell-mouse-map)) | 1460 | flyspell-mouse-map)) |
| 1460 | flyspell-overlay)) | 1461 | flyspell-overlay)) |
| 1461 | 1462 | ||
| 1462 | ;*---------------------------------------------------------------------*/ | 1463 | ;*---------------------------------------------------------------------*/ |
| 1463 | ;* flyspell-highlight-incorrect-region ... */ | 1464 | ;* flyspell-highlight-incorrect-region ... */ |
| 1464 | ;*---------------------------------------------------------------------*/ | 1465 | ;*---------------------------------------------------------------------*/ |
| @@ -1480,7 +1481,8 @@ for the overlay." | |||
| 1480 | ;; now we can use a new overlay | 1481 | ;; now we can use a new overlay |
| 1481 | (setq flyspell-overlay | 1482 | (setq flyspell-overlay |
| 1482 | (make-flyspell-overlay beg end | 1483 | (make-flyspell-overlay beg end |
| 1483 | 'flyspell-incorrect-face 'highlight)))))) | 1484 | 'flyspell-incorrect-face |
| 1485 | 'highlight)))))) | ||
| 1484 | 1486 | ||
| 1485 | ;*---------------------------------------------------------------------*/ | 1487 | ;*---------------------------------------------------------------------*/ |
| 1486 | ;* flyspell-highlight-duplicate-region ... */ | 1488 | ;* flyspell-highlight-duplicate-region ... */ |
| @@ -1677,7 +1679,7 @@ This command proposes various successive corrections for the current word." | |||
| 1677 | old-max)))))))))) | 1679 | old-max)))))))))) |
| 1678 | (setq flyspell-auto-correct-pos (point)) | 1680 | (setq flyspell-auto-correct-pos (point)) |
| 1679 | (ispell-pdict-save t))))) | 1681 | (ispell-pdict-save t))))) |
| 1680 | 1682 | ||
| 1681 | ;*---------------------------------------------------------------------*/ | 1683 | ;*---------------------------------------------------------------------*/ |
| 1682 | ;* flyspell-correct-word ... */ | 1684 | ;* flyspell-correct-word ... */ |
| 1683 | ;*---------------------------------------------------------------------*/ | 1685 | ;*---------------------------------------------------------------------*/ |
| @@ -1928,9 +1930,8 @@ The word checked is the word at the mouse position." | |||
| 1928 | menu)))) | 1930 | menu)))) |
| 1929 | 1931 | ||
| 1930 | ;*---------------------------------------------------------------------*/ | 1932 | ;*---------------------------------------------------------------------*/ |
| 1931 | ;* Some example functions for real autocorrecting */ | 1933 | ;* Some example functions for real autocorrecting */ |
| 1932 | ;*---------------------------------------------------------------------*/ | 1934 | ;*---------------------------------------------------------------------*/ |
| 1933 | |||
| 1934 | (defun flyspell-maybe-correct-transposition (beg end poss) | 1935 | (defun flyspell-maybe-correct-transposition (beg end poss) |
| 1935 | "Check replacements for transposed characters. | 1936 | "Check replacements for transposed characters. |
| 1936 | 1937 | ||
| @@ -2004,7 +2005,7 @@ This function is meant to be added to 'flyspell-incorrect-hook'." | |||
| 2004 | ;*---------------------------------------------------------------------*/ | 2005 | ;*---------------------------------------------------------------------*/ |
| 2005 | (defun flyspell-change-abbrev (table old new) | 2006 | (defun flyspell-change-abbrev (table old new) |
| 2006 | (set (abbrev-symbol old table) new)) | 2007 | (set (abbrev-symbol old table) new)) |
| 2007 | 2008 | ||
| 2008 | (provide 'flyspell) | 2009 | (provide 'flyspell) |
| 2009 | 2010 | ||
| 2010 | ;;; flyspell.el ends here | 2011 | ;;; flyspell.el ends here |