Commit 4132d58c authored by Martin Rudalics's avatar Martin Rudalics
Browse files

(ispell-start-process): Defend against bad default-directory.

parent 9fff44d5
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
......@@ -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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment