/[emacs]/emacs/lisp/textmodes/flyspell.el
ViewVC logotype

Diff of /emacs/lisp/textmodes/flyspell.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26