diff options
| author | Martin Rudalics | 2007-05-16 05:51:51 +0000 |
|---|---|---|
| committer | Martin Rudalics | 2007-05-16 05:51:51 +0000 |
| commit | 4132d58cf8c70e2b329e499149e4f4ad4b88627e (patch) | |
| tree | 3dafdb21e24e461aaec91e483f565bd51c422c44 | |
| parent | 9fff44d50016108a350c90c39b68e302277080d7 (diff) | |
| download | emacs-4132d58cf8c70e2b329e499149e4f4ad4b88627e.tar.gz emacs-4132d58cf8c70e2b329e499149e4f4ad4b88627e.zip | |
(ispell-start-process): Defend against bad default-directory.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/textmodes/ispell.el | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 31a65b3a1e0..24d7436c904 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2007-05-16 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * textmodes/ispell.el (ispell-start-process): Defend against bad | ||
| 4 | default-directory. | ||
| 5 | |||
| 1 | 2007-05-14 Eli Zaretskii <eliz@gnu.org> | 6 | 2007-05-14 Eli Zaretskii <eliz@gnu.org> |
| 2 | 7 | ||
| 3 | * mail/rmail.el (rmail-convert-to-babyl-format): Check | 8 | * mail/rmail.el (rmail-convert-to-babyl-format): Check |
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index a3c9575d90c..e4b2dd9f040 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -2483,7 +2483,12 @@ When asynchronous processes are not supported, `run' is always returned." | |||
| 2483 | (defun ispell-start-process () | 2483 | (defun ispell-start-process () |
| 2484 | "Start the ispell process, with support for no asynchronous processes. | 2484 | "Start the ispell process, with support for no asynchronous processes. |
| 2485 | Keeps argument list for future ispell invocations for no async support." | 2485 | Keeps argument list for future ispell invocations for no async support." |
| 2486 | (let (args) | 2486 | (let ((default-directory default-directory) |
| 2487 | args) | ||
| 2488 | (unless (and (file-directory-p default-directory) | ||
| 2489 | (file-readable-p default-directory)) | ||
| 2490 | ;; Defend against bad `default-directory'. | ||
| 2491 | (setq default-directory (expand-file-name "~/"))) | ||
| 2487 | ;; Local dictionary becomes the global dictionary in use. | 2492 | ;; Local dictionary becomes the global dictionary in use. |
| 2488 | (setq ispell-current-dictionary | 2493 | (setq ispell-current-dictionary |
| 2489 | (or ispell-local-dictionary ispell-dictionary)) | 2494 | (or ispell-local-dictionary ispell-dictionary)) |