# HG changeset patch # User Martin Rudalics # Date 1179294597 0 # Node ID 1d7f2c35bf902b0c27a01bf1bb64db80542ff6c1 # Parent 6518bb67d7fac46b257cd1274dcb64a8ded9bb1a (ispell-start-process): Defend against bad default-directory. diff -r 6518bb67d7fa -r 1d7f2c35bf90 lisp/textmodes/ispell.el --- a/lisp/textmodes/ispell.el Tue May 15 07:11:09 2007 +0000 +++ b/lisp/textmodes/ispell.el Wed May 16 05:49:57 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))