;; To enable Flyspell in text representing computer programs, type
;; M-x flyspell-prog-mode.
;; In that mode only text inside comments is checked.
-;;
+;;
;; Note: consider setting the variable ispell-parser to `tex' to
;; avoid TeX command checking; use `(setq ispell-parser 'tex)'.
-;;
+;;
;; Some user variables control the behavior of flyspell. They are
;; those defined under the `User variables' comment.
;;; Code:
+
(require 'ispell)
;*---------------------------------------------------------------------*/
:group 'flyspell
:version "21.1"
:type 'boolean)
-
+
;;;###autoload
(defcustom flyspell-mode-line-string " Fly"
"*String displayed on the modeline when flyspell is active.
The default flyspell behavior is to highlight incorrect words.
With no argument, this command toggles Flyspell mode.
With a prefix argument ARG, turn Flyspell minor mode on iff ARG is positive.
-
+
Bindings:
\\[ispell-word]: correct words (using Ispell).
\\[flyspell-auto-correct-word]: automatically correct word.
;* For remembering buffers running flyspell */
;*---------------------------------------------------------------------*/
(defvar flyspell-buffers nil)
-
+
;*---------------------------------------------------------------------*/
;* flyspell-minibuffer-p ... */
;*---------------------------------------------------------------------*/
(ispell-accept-buffer-local-defs)
(if (not (and (eq flyspell-dash-dictionary ispell-dictionary)
(eq flyspell-dash-local-dictionary ispell-local-dictionary)))
- ;; the dictionary as changed
+ ;; the dictionary has changed
(progn
(setq flyspell-dash-dictionary ispell-dictionary)
(setq flyspell-dash-local-dictionary ispell-local-dictionary)
(insert (format " cache-start: %S\n" flyspell-word-cache-start))
(insert (format " cache-end : %S\n" flyspell-word-cache-end))
(goto-char (point-max)))))
-
+
;*---------------------------------------------------------------------*/
;* flyspell-debug-signal-word-checked ... */
;*---------------------------------------------------------------------*/
(setq flyspell-ispell-casechars-cache ispell-casechars)
(setq flyspell-casechars-cache ispell-casechars)
flyspell-casechars-cache))))
-
+
;*---------------------------------------------------------------------*/
;* flyspell-get-not-casechars-cache ... */
;*---------------------------------------------------------------------*/
;; have to kill the temporary buffer
(kill-buffer flyspell-external-ispell-buffer)
(setq flyspell-external-ispell-buffer nil)))
-
+
;*---------------------------------------------------------------------*/
;* flyspell-large-region ... */
;*---------------------------------------------------------------------*/
flyspell-overlay-keymap-property-name
flyspell-mouse-map))
flyspell-overlay))
-
+
;*---------------------------------------------------------------------*/
;* flyspell-highlight-incorrect-region ... */
;*---------------------------------------------------------------------*/
;; now we can use a new overlay
(setq flyspell-overlay
(make-flyspell-overlay beg end
- 'flyspell-incorrect-face 'highlight))))))
+ 'flyspell-incorrect-face
+ 'highlight))))))
;*---------------------------------------------------------------------*/
;* flyspell-highlight-duplicate-region ... */
old-max))))))))))
(setq flyspell-auto-correct-pos (point))
(ispell-pdict-save t)))))
-
+
;*---------------------------------------------------------------------*/
;* flyspell-correct-word ... */
;*---------------------------------------------------------------------*/
menu))))
;*---------------------------------------------------------------------*/
-;* Some example functions for real autocorrecting */
+;* Some example functions for real autocorrecting */
;*---------------------------------------------------------------------*/
-
(defun flyspell-maybe-correct-transposition (beg end poss)
"Check replacements for transposed characters.
;*---------------------------------------------------------------------*/
(defun flyspell-change-abbrev (table old new)
(set (abbrev-symbol old table) new))
-
+
(provide 'flyspell)
;;; flyspell.el ends here