(ispell-start-process): Defend against bad default-directory.
This commit is contained in:
parent
464df798e9
commit
ef1f3012fa
2 changed files with 11 additions and 1 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2007-05-17 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* textmodes/ispell.el (ispell-start-process): Defend against bad
|
||||
default-directory.
|
||||
|
||||
2007-05-17 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* vc-hooks.el (vc-find-root): Stop searching when the user changes.
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue