--- ispell.el.orig 2012-11-30 17:07:14.641701686 +0100 +++ ispell.el 2012-11-30 18:50:08.725283277 +0100 @@ -2669,7 +2669,8 @@ orig-args (if ispell-current-personal-dictionary ; Use specified pers dict. (list "-p" - (expand-file-name ispell-current-personal-dictionary))) + (expand-file-name ispell-current-personal-dictionary + current-ispell-directory))) ;; If we are using recent aspell or hunspell, make sure we use the ;; right encoding for communication. ispell or older aspell/hunspell ;; does not support this. @@ -2706,18 +2707,21 @@ (let* (;; Basename of dictionary used by the spell-checker (dict-bname (or (car (cdr (member "-d" (ispell-get-ispell-args)))) ispell-current-dictionary)) + ;; The directory where process was started. + (current-ispell-directory default-directory) + ;; The default directory for the process. ;; Use "~/" as default-directory unless using Ispell with per-dir ;; personal dictionaries and not in a minibuffer under XEmacs (default-directory (if (or ispell-really-aspell ispell-really-hunspell ;; Protect against bad default-directory - (not (and (file-directory-p default-directory) - (file-readable-p default-directory))) + (not (and (file-directory-p current-ispell-directory) + (file-readable-p current-ispell-directory))) ;; Ispell and per-dir personal dicts available - (not (or (file-readable-p (concat default-directory + (not (or (file-readable-p (concat current-ispell-directory ".ispell_words")) - (file-readable-p (concat default-directory + (file-readable-p (concat current-ispell-directory ".ispell_" (or dict-bname "default"))))) @@ -2725,7 +2729,7 @@ (and (window-minibuffer-p) (not (fboundp 'minibuffer-selected-window)))) (expand-file-name "~/") - (expand-file-name default-directory)))) + (expand-file-name current-ispell-directory)))) ;; Check if process needs restart (if (and ispell-process (eq (ispell-process-status) 'run)