changeset 80923:1d7f2c35bf90

(ispell-start-process): Defend against bad default-directory.
author Martin Rudalics <rudalics@gmx.at>
date Wed, 16 May 2007 05:49:57 +0000
parents 6518bb67d7fa
children 0c28126be013
files lisp/textmodes/ispell.el
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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))