comparison lisp/textmodes/ispell.el @ 71289:95f5febb2bb5

(ispell-kill-ispell): If ispell has been launched asynchronously, delete its process instead of being cool. (ispell-async-processp): Check for `delete-process' existence instead of `kill-process' one for consistency. Submitted by: Micha¸«³l Cadilhac <michael.cadilhac@lrde.org>
author Kim F. Storm <storm@cua.dk>
date Fri, 09 Jun 2006 13:04:13 +0000
parents 6a91e8b1eea0
children c7889d24e9d7 138027c8c982
comparison
equal deleted inserted replaced
71288:5bf4824174e1 71289:95f5febb2bb5
863 "Directory where ispell dictionaries reside.") 863 "Directory where ispell dictionaries reside.")
864 864
865 (defvar ispell-process nil 865 (defvar ispell-process nil
866 "The process object for Ispell.") 866 "The process object for Ispell.")
867 867
868 (defvar ispell-async-processp (and (fboundp 'kill-process) 868 (defvar ispell-async-processp (and (fboundp 'delete-process)
869 (fboundp 'process-send-string) 869 (fboundp 'process-send-string)
870 (fboundp 'accept-process-output) 870 (fboundp 'accept-process-output)
871 ;;(fboundp 'start-process) 871 ;;(fboundp 'start-process)
872 ;;(fboundp 'set-process-filter) 872 ;;(fboundp 'set-process-filter)
873 ;;(fboundp 'process-kill-without-query) 873 ;;(fboundp 'process-kill-without-query)
2570 (if (not (and ispell-process 2570 (if (not (and ispell-process
2571 (eq (ispell-process-status) 'run))) 2571 (eq (ispell-process-status) 'run)))
2572 (or no-error 2572 (or no-error
2573 (error "There is no ispell process running!")) 2573 (error "There is no ispell process running!"))
2574 (if ispell-async-processp 2574 (if ispell-async-processp
2575 (progn 2575 (delete-process ispell-process)
2576 (process-send-eof ispell-process)
2577 (if (eq (ispell-process-status) 'run)
2578 (ispell-accept-output 1))
2579 (if (eq (ispell-process-status) 'run)
2580 (kill-process ispell-process))
2581 (while (not (or (eq (ispell-process-status) 'exit)
2582 (eq (ispell-process-status) 'signal)))
2583 (sleep-for 0.25)))
2584 ;; synchronous processes 2576 ;; synchronous processes
2585 (ispell-send-string "\n") ; make sure side effects occurred. 2577 (ispell-send-string "\n") ; make sure side effects occurred.
2586 (kill-buffer ispell-output-buffer) 2578 (kill-buffer ispell-output-buffer)
2587 (kill-buffer ispell-session-buffer) 2579 (kill-buffer ispell-session-buffer)
2588 (setq ispell-output-buffer nil 2580 (setq ispell-output-buffer nil