aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorEli Zaretskii2015-04-28 18:36:25 +0300
committerEli Zaretskii2015-04-28 18:36:25 +0300
commite78aef008332477d568e904de3646cfc1ba68cbf (patch)
treee4cddcd7612278aea9a9ae05df8c360b7c3308e6 /lisp
parentf23d716a0c7baf30179c79c88ada131e137250cf (diff)
downloademacs-e78aef008332477d568e904de3646cfc1ba68cbf.tar.gz
emacs-e78aef008332477d568e904de3646cfc1ba68cbf.zip
Fix synchronous invocation of Ispell
* lisp/textmodes/ispell.el (ispell-init-process): Assign a non-nil value to ispell-process-directory before calling ispell-init-process. Don't call set-process-coding-system if ispell-async-processp is nil. (Bug#20448)
Diffstat (limited to 'lisp')
-rw-r--r--lisp/textmodes/ispell.el15
1 files changed, 12 insertions, 3 deletions
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 498def0b966..43003afe543 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -2986,10 +2986,14 @@ Keeps argument list for future Ispell invocations for no async support."
2986 (or ispell-local-dictionary ispell-dictionary "default")) 2986 (or ispell-local-dictionary ispell-dictionary "default"))
2987 (sit-for 0) 2987 (sit-for 0)
2988 (setq ispell-library-directory (ispell-check-version) 2988 (setq ispell-library-directory (ispell-check-version)
2989 ;; Assign a non-nil value to ispell-process-directory
2990 ;; before calling ispell-start-process, since that
2991 ;; function needs it to set default-directory when
2992 ;; ispell-async-processp is nil.
2993 ispell-process-directory default-directory
2989 ispell-process (ispell-start-process) 2994 ispell-process (ispell-start-process)
2990 ispell-filter nil 2995 ispell-filter nil
2991 ispell-filter-continue nil 2996 ispell-filter-continue nil)
2992 ispell-process-directory default-directory)
2993 2997
2994 (unless (equal ispell-process-directory (expand-file-name "~/")) 2998 (unless (equal ispell-process-directory (expand-file-name "~/"))
2995 ;; At this point, `ispell-process-directory' will be "~/" unless using 2999 ;; At this point, `ispell-process-directory' will be "~/" unless using
@@ -3015,7 +3019,12 @@ Keeps argument list for future Ispell invocations for no async support."
3015 (if (and (or (featurep 'xemacs) 3019 (if (and (or (featurep 'xemacs)
3016 (and (boundp 'enable-multibyte-characters) 3020 (and (boundp 'enable-multibyte-characters)
3017 enable-multibyte-characters)) 3021 enable-multibyte-characters))
3018 (fboundp 'set-process-coding-system)) 3022 (fboundp 'set-process-coding-system)
3023 ;; Evidently, some people use the synchronous mode even
3024 ;; when async subprocesses are supported, in which case
3025 ;; set-process-coding-system is bound, but
3026 ;; ispell-process is not a process object.
3027 ispell-async-processp)
3019 (set-process-coding-system ispell-process (ispell-get-coding-system) 3028 (set-process-coding-system ispell-process (ispell-get-coding-system)
3020 (ispell-get-coding-system))) 3029 (ispell-get-coding-system)))
3021 ;; Get version ID line 3030 ;; Get version ID line