>![]() |
Next: emacspeak-forms Options, Previous: emacspeak-eudc Options, Up: Emacspeak Customizations
Commentary: This module speech enables flyspell.
(require 'emacspeak-preamble)
(defgroup emacspeak-flyspell nil "Emacspeak support for on the fly spell checking." :group 'emacspeak :group 'flyspell :prefix "emacspeak-flyspell-")
(def-voice-font emacspeak-flyspell-highlight-personality voice-bolden 'flyspell-incorrect-face "Voice used to highlight spelling errors. ")
(declaim (special flyspell-delayed-commands)) (push 'emacspeak-self-insert-command flyspell-delayed-commands) (defadvice flyspell-auto-correct-word (around emacspeak pre act comp) "Speak the correction we inserted" (cond ((interactive-p) ad-do-it (dtk-speak (car (flyspell-get-word nil))) (emacspeak-auditory-icon 'select-object)) (t ad-do-it)) ad-return-value)
(defadvice flyspell-unhighlight-at (before debug pre act comp) (let ((overlay-list (overlays-at pos)) (o nil)) (while overlay-list (setq o (car overlay-list)) (when (flyspell-overlay-p o) (put-text-property (overlay-start o) (overlay-end o) 'personality nil)) (setq overlay-list (cdr overlay-list)))))
(defun emacspeak-flyspell-highlight-incorrect-word (beg end ignore) "Put property personality with value `emacspeak-flyspell-highlight-personality' from beg to end" (declare (special emacspeak-flyspell-highlight-personality)) (ems-modify-buffer-safely (put-text-property beg end 'personality emacspeak-flyspell-highlight-personality)) (emacspeak-speak-region beg end) nil)
(add-hook 'flyspell-incorrect-hook 'emacspeak-flyspell-highlight-incorrect-word)
(provide 'emacspeak-flyspell)
local variables: folded-file: t byte-compile-dynamic: t
Automatically generated documentation for options defined in module emacspeak-flyspell. These options are customizable via Emacs' Custom interface.