diff options
| author | Martin Rudalics | 2007-05-17 08:28:29 +0000 |
|---|---|---|
| committer | Martin Rudalics | 2007-05-17 08:28:29 +0000 |
| commit | ef1f3012faf1ef629c7b82e9dcbf043a78d8b4ab (patch) | |
| tree | 17ee51c6ca316848c1fc6280516dd4cf2afb7f03 /lisp/textmodes | |
| parent | 464df798e9bacb3a7ec9c0ead081c31e3e1d024d (diff) | |
| download | emacs-ef1f3012faf1ef629c7b82e9dcbf043a78d8b4ab.tar.gz emacs-ef1f3012faf1ef629c7b82e9dcbf043a78d8b4ab.zip | |
(ispell-start-process): Defend against bad default-directory.
Diffstat (limited to 'lisp/textmodes')
| -rw-r--r-- | lisp/textmodes/ispell.el | 7 |
1 files changed, 6 insertions, 1 deletions
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)) |