Function: ispell-kill-ispell

ispell-kill-ispell is an autoloaded, interactive and byte-compiled function defined in ispell.el.gz.

Signature

(ispell-kill-ispell &optional NO-ERROR CLEAR)

Documentation

Kill current Ispell process (so that you may start a fresh one).

With NO-ERROR, just return non-nil if there was no Ispell running. With CLEAR, buffer session localwords are cleaned.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/ispell.el.gz
;;;###autoload
(defun ispell-kill-ispell (&optional no-error clear)
  "Kill current Ispell process (so that you may start a fresh one).
With NO-ERROR, just return non-nil if there was no Ispell running.
With CLEAR, buffer session localwords are cleaned."
  (interactive)
  ;; This hook is typically used by flyspell to flush some variables used
  ;; to optimize the common cases.
  (run-hooks 'ispell-kill-ispell-hook)
  (if (or clear
	  (called-interactively-p 'interactive))
      (setq ispell-buffer-session-localwords nil))
  (if (not (and ispell-process
		(eq (ispell-process-status) 'run)))
      (or no-error
	  (error "There is no Ispell process running!"))
    (if ispell-async-processp
	(delete-process ispell-process)
      ;; Synchronous processes.
      (ispell-send-string "\n")		; Make sure side effects occurred.
      (kill-buffer ispell-output-buffer)
      (kill-buffer ispell-session-buffer)
      (setq ispell-output-buffer nil
	    ispell-session-buffer nil))
    (setq ispell-process nil)
    (message "Ispell process killed")
    nil))