Mercurial > emacs
comparison lisp/textmodes/ispell.el @ 77738:d3102003ff5d
(ispell-start-process): Defend against bad default-directory.
author | Martin Rudalics <rudalics@gmx.at> |
---|---|
date | Thu, 17 May 2007 08:27:08 +0000 |
parents | 32db7e65b617 |
children | 21c0fd9e61cb |
comparison
equal
deleted
inserted
replaced
77737:1b21c23e4f56 | 77738:d3102003ff5d |
---|---|
2481 | 2481 |
2482 | 2482 |
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)) |
2490 (setq ispell-current-personal-dictionary | 2495 (setq ispell-current-personal-dictionary |
2491 (or ispell-local-pdict ispell-personal-dictionary)) | 2496 (or ispell-local-pdict ispell-personal-dictionary)) |