summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/textmodes/ispell.el21
2 files changed, 11 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 89c10440788..503added5cc 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -2,7 +2,8 @@
* textmodes/ispell.el (ispell-init-process)
(ispell-start-process): Make sure personal dictionary name is
- expanded after initial `default-directory' value (Bug#13019).
+ expanded after initial `default-directory' value. Use expanded
+ values for keep/restart checks (Bug#13019).
2012-12-03 Jay Belanger <jay.p.belanger@gmail.com>
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 81468fad85f..961fb1bad83 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -2649,11 +2649,8 @@ When asynchronous processes are not supported, `run' is always returned."
(defun ispell-start-process ()
"Start the Ispell process, with support for no asynchronous processes.
Keeps argument list for future Ispell invocations for no async support."
- ;; Local dictionary becomes the global dictionary in use.
- (setq ispell-current-dictionary
- (or ispell-local-dictionary ispell-dictionary))
- (setq ispell-current-personal-dictionary
- (or ispell-local-pdict ispell-personal-dictionary))
+ ;; `ispell-current-dictionary' and `ispell-current-personal-dictionary'
+ ;; are properly set in `ispell-internal-change-dictionary'.
(let* ((default-directory
(if (and (file-directory-p default-directory)
(file-readable-p default-directory))
@@ -2668,9 +2665,7 @@ Keeps argument list for future Ispell invocations for no async support."
(list "-d" ispell-current-dictionary))
orig-args
(if ispell-current-personal-dictionary ; Use specified pers dict.
- (list "-p"
- (expand-file-name ispell-current-personal-dictionary
- current-ispell-directory)))
+ (list "-p" ispell-current-personal-dictionary))
;; 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.
@@ -2900,13 +2895,15 @@ By just answering RET you can find out what the current dictionary is."
"Update the dictionary and the personal dictionary used by Ispell.
This may kill the Ispell process; if so, a new one will be started
when needed."
- (let ((dict (or ispell-local-dictionary ispell-dictionary))
- (pdict (or ispell-local-pdict ispell-personal-dictionary)))
+ (let* ((dict (or ispell-local-dictionary ispell-dictionary))
+ (pdict (or ispell-local-pdict ispell-personal-dictionary))
+ (expanded-pdict (if pdict (expand-file-name pdict))))
(unless (and (equal ispell-current-dictionary dict)
- (equal ispell-current-personal-dictionary pdict))
+ (equal ispell-current-personal-dictionary
+ expanded-pdict))
(ispell-kill-ispell t)
(setq ispell-current-dictionary dict
- ispell-current-personal-dictionary pdict))))
+ ispell-current-personal-dictionary expanded-pdict))))
;; Avoid error messages when compiling for these dynamic variables.
(defvar ispell-start)