Commit f7cf7ffe authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(ispell-highlight, ispell-dehighlight): New functions.

(ispell-command-loop, ispell-next): Call them.
(ispell-highlight, ispell-overlay): New variables.
parent 5cb1595f
......@@ -342,6 +342,7 @@ Return value is t unless exit is due to typing `q'."
(setq ispell-bad-words (cdr ispell-bad-words))
(set-marker next nil)))
t)
(ispell-dehighlight)
(if ispell-window-configuration
(set-window-configuration ispell-window-configuration))
(cond ((null ispell-bad-words)
......@@ -536,6 +537,7 @@ L lookup; Q quit\n")
(if (null message)
(setq first-line (concat "No near misses for '" word "'"))
(setq first-line (concat "Near misses for '" word "'")))
(ispell-highlight start end)
(while flag
(ispell-show-choices word message first-line)
(message "Ispell command: ")
......@@ -623,6 +625,28 @@ L lookup; Q quit\n")
(kill-emacs 1))
(write-region (point-min) (point-max) "ispell.info"))
(defvar ispell-highlight t
"*Non-nil means to highlight ispell words.")
(defvar ispell-overlay nil)
(defun ispell-dehighlight ()
(and ispell-overlay
(progn
(delete-overlay ispell-overlay)
(setq ispell-overlay nil))))
(defun ispell-highlight (start end)
(and ispell-highlight
(progn
(or ispell-overlay
(progn
(setq ispell-overlay (make-overlay start end))
(overlay-put ispell-overlay 'face
(if (internal-find-face 'ispell)
'ispell 'region))))
(move-overlay ispell-overlay start end (current-buffer)))))
;;;; ispell-complete-word
;;; Brief Description:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment