diff options
Diffstat (limited to 'lisp/textmodes')
| -rw-r--r-- | lisp/textmodes/ispell.el | 21 |
1 files changed, 9 insertions, 12 deletions
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." | |||
| 2649 | (defun ispell-start-process () | 2649 | (defun ispell-start-process () |
| 2650 | "Start the Ispell process, with support for no asynchronous processes. | 2650 | "Start the Ispell process, with support for no asynchronous processes. |
| 2651 | Keeps argument list for future Ispell invocations for no async support." | 2651 | Keeps argument list for future Ispell invocations for no async support." |
| 2652 | ;; Local dictionary becomes the global dictionary in use. | 2652 | ;; `ispell-current-dictionary' and `ispell-current-personal-dictionary' |
| 2653 | (setq ispell-current-dictionary | 2653 | ;; are properly set in `ispell-internal-change-dictionary'. |
| 2654 | (or ispell-local-dictionary ispell-dictionary)) | ||
| 2655 | (setq ispell-current-personal-dictionary | ||
| 2656 | (or ispell-local-pdict ispell-personal-dictionary)) | ||
| 2657 | (let* ((default-directory | 2654 | (let* ((default-directory |
| 2658 | (if (and (file-directory-p default-directory) | 2655 | (if (and (file-directory-p default-directory) |
| 2659 | (file-readable-p default-directory)) | 2656 | (file-readable-p default-directory)) |
| @@ -2668,9 +2665,7 @@ Keeps argument list for future Ispell invocations for no async support." | |||
| 2668 | (list "-d" ispell-current-dictionary)) | 2665 | (list "-d" ispell-current-dictionary)) |
| 2669 | orig-args | 2666 | orig-args |
| 2670 | (if ispell-current-personal-dictionary ; Use specified pers dict. | 2667 | (if ispell-current-personal-dictionary ; Use specified pers dict. |
| 2671 | (list "-p" | 2668 | (list "-p" ispell-current-personal-dictionary)) |
| 2672 | (expand-file-name ispell-current-personal-dictionary | ||
| 2673 | current-ispell-directory))) | ||
| 2674 | ;; If we are using recent aspell or hunspell, make sure we use the | 2669 | ;; If we are using recent aspell or hunspell, make sure we use the |
| 2675 | ;; right encoding for communication. ispell or older aspell/hunspell | 2670 | ;; right encoding for communication. ispell or older aspell/hunspell |
| 2676 | ;; does not support this. | 2671 | ;; does not support this. |
| @@ -2900,13 +2895,15 @@ By just answering RET you can find out what the current dictionary is." | |||
| 2900 | "Update the dictionary and the personal dictionary used by Ispell. | 2895 | "Update the dictionary and the personal dictionary used by Ispell. |
| 2901 | This may kill the Ispell process; if so, a new one will be started | 2896 | This may kill the Ispell process; if so, a new one will be started |
| 2902 | when needed." | 2897 | when needed." |
| 2903 | (let ((dict (or ispell-local-dictionary ispell-dictionary)) | 2898 | (let* ((dict (or ispell-local-dictionary ispell-dictionary)) |
| 2904 | (pdict (or ispell-local-pdict ispell-personal-dictionary))) | 2899 | (pdict (or ispell-local-pdict ispell-personal-dictionary)) |
| 2900 | (expanded-pdict (if pdict (expand-file-name pdict)))) | ||
| 2905 | (unless (and (equal ispell-current-dictionary dict) | 2901 | (unless (and (equal ispell-current-dictionary dict) |
| 2906 | (equal ispell-current-personal-dictionary pdict)) | 2902 | (equal ispell-current-personal-dictionary |
| 2903 | expanded-pdict)) | ||
| 2907 | (ispell-kill-ispell t) | 2904 | (ispell-kill-ispell t) |
| 2908 | (setq ispell-current-dictionary dict | 2905 | (setq ispell-current-dictionary dict |
| 2909 | ispell-current-personal-dictionary pdict)))) | 2906 | ispell-current-personal-dictionary expanded-pdict)))) |
| 2910 | 2907 | ||
| 2911 | ;; Avoid error messages when compiling for these dynamic variables. | 2908 | ;; Avoid error messages when compiling for these dynamic variables. |
| 2912 | (defvar ispell-start) | 2909 | (defvar ispell-start) |