# HG changeset patch # User Martin Rudalics # Date 1179390428 0 # Node ID d3102003ff5d238c920e64b99d32906dc24a081a # Parent 1b21c23e4f56bf7be419237b9d6d5654232a6c40 (ispell-start-process): Defend against bad default-directory. diff -r 1b21c23e4f56 -r d3102003ff5d lisp/textmodes/ispell.el --- 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))