Mercurial > emacs
diff 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 |
line wrap: on
line diff
--- a/lisp/textmodes/ispell.el Thu May 17 08:02:52 2007 +0000 +++ b/lisp/textmodes/ispell.el Thu May 17 08:27:08 2007 +0000 @@ -2483,7 +2483,12 @@ (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." - (let (args) + (let ((default-directory default-directory) + args) + (unless (and (file-directory-p default-directory) + (file-readable-p default-directory)) + ;; Defend against bad `default-directory'. + (setq default-directory (expand-file-name "~/"))) ;; Local dictionary becomes the global dictionary in use. (setq ispell-current-dictionary (or ispell-local-dictionary ispell-dictionary))