]> git.eshelyaron.com Git - emacs.git/commitdiff
(ispell-start-process): Defend against bad default-directory.
authorMartin Rudalics <rudalics@gmx.at>
Wed, 16 May 2007 05:51:51 +0000 (05:51 +0000)
committerMartin Rudalics <rudalics@gmx.at>
Wed, 16 May 2007 05:51:51 +0000 (05:51 +0000)
lisp/ChangeLog
lisp/textmodes/ispell.el

index 31a65b3a1e0b1b32c6b7b03bfb36e459088cf2b2..24d7436c9046f4cda765e55a3fc058e4c0200b96 100644 (file)
@@ -1,3 +1,8 @@
+2007-05-16  Martin Rudalics  <rudalics@gmx.at>
+
+       * textmodes/ispell.el (ispell-start-process): Defend against bad
+       default-directory.
+
 2007-05-14  Eli Zaretskii  <eliz@gnu.org>
 
        * mail/rmail.el (rmail-convert-to-babyl-format): Check
index a3c9575d90c811232d7dcee103cfe5fb544be9c5..e4b2dd9f040cf28b86ebc0370345eb34ec0c94cc 100644 (file)
@@ -2483,7 +2483,12 @@ When asynchronous processes are not supported, `run' is always returned."
 (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))