Mercurial > emacs
changeset 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 | 1b21c23e4f56 |
children | a27705ef89c6 |
files | lisp/textmodes/ispell.el |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
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))