emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: flyspell-mode fails in non-existing directory


From: martin rudalics
Subject: Re: flyspell-mode fails in non-existing directory
Date: Mon, 14 May 2007 14:32:15 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> Also, I call flyspell-mode in a major-mode hook (or is there anything
> wrong with that?), so the error occurs before I even could save it.

I understand.

>>> ispell seems to work around this for synchronous processes, but
>>> apparently not for `start-process'.
>>>
>>
>> I presume both ispell and flyspell use asynchronous processes on your
>> system.  Moreover the same error should be issued for synchronous  ones.
>> In fact, both `start-process' and `call-process' have identic code  here:
>>
>
> True, those two have identical code.  Yet `ispell-call-process' is a
> wrapper used by ispell to "defend against bad `default-directory'".
> There is no such wrapper for in `ispell-start-process'.

In fact I told Richard about that but forgot to check his patches.
Please try the attached one.
*** ispell.el   Fri Mar 23 08:46:26 2007
--- ispell.el   Mon May 14 14:15:00 2007
***************
*** 2483,2489 ****
  (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)
      ;; Local dictionary becomes the global dictionary in use.
      (setq ispell-current-dictionary
          (or ispell-local-dictionary ispell-dictionary))
--- 2483,2493 ----
  (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 ((default-directory default-directory)
!         args)
!     (unless (and (file-directory-p default-directory)
!                (file-readable-p 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))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]