diff options
| author | Kim F. Storm | 2006-06-09 13:04:13 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2006-06-09 13:04:13 +0000 |
| commit | 2a997209bd49f0a969b628f2036fa401245bb76d (patch) | |
| tree | cc3c55f7c58e9fae7c3ecdce10304798fb6d65d6 | |
| parent | 36ac5ea59b33c52a1a9b5220431855ba9e922875 (diff) | |
| download | emacs-2a997209bd49f0a969b628f2036fa401245bb76d.tar.gz emacs-2a997209bd49f0a969b628f2036fa401245bb76d.zip | |
(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>
| -rw-r--r-- | lisp/textmodes/ispell.el | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 7bfedb1bd97..a4d873a543d 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -865,7 +865,7 @@ and added as a submenu of the \"Edit\" menu.") | |||
| 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) |
| @@ -2572,15 +2572,7 @@ With NO-ERROR, just return non-nil if there was no Ispell running." | |||
| 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) |