comparison lisp/textmodes/ispell.el @ 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 32db7e65b617
children 21c0fd9e61cb
comparison
equal deleted inserted replaced
80922:6518bb67d7fa 80923:1d7f2c35bf90
2481 2481
2482 2482
2483 (defun ispell-start-process () 2483 (defun ispell-start-process ()
2484 "Start the ispell process, with support for no asynchronous processes. 2484 "Start the ispell process, with support for no asynchronous processes.
2485 Keeps argument list for future ispell invocations for no async support." 2485 Keeps argument list for future ispell invocations for no async support."
2486 (let (args) 2486 (let ((default-directory default-directory)
2487 args)
2488 (unless (and (file-directory-p default-directory)
2489 (file-readable-p default-directory))
2490 ;; Defend against bad `default-directory'.
2491 (setq default-directory (expand-file-name "~/")))
2487 ;; Local dictionary becomes the global dictionary in use. 2492 ;; Local dictionary becomes the global dictionary in use.
2488 (setq ispell-current-dictionary 2493 (setq ispell-current-dictionary
2489 (or ispell-local-dictionary ispell-dictionary)) 2494 (or ispell-local-dictionary ispell-dictionary))
2490 (setq ispell-current-personal-dictionary 2495 (setq ispell-current-personal-dictionary
2491 (or ispell-local-pdict ispell-personal-dictionary)) 2496 (or ispell-local-pdict ispell-personal-dictionary))