GNU bug report logs -
#15903
24.3.50; Fix small issue with ispell-hunspell when dictionary is set to default (nil)
Previous Next
Reported by: Vladimir Lomov <lomov.vl <at> gmail.com>
Date: Fri, 15 Nov 2013 15:18:02 UTC
Severity: normal
Found in version 24.3.50
Done: Agustin Martin <agustin.martin <at> hispalinux.es>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Mon, Nov 18, 2013 at 03:33:00PM +0900, Vladimir Lomov wrote:
> Hello,
> ** Agustin Martin [2013-11-16 12:43:02 +0100]:
>
> > 2013/11/15 Vladimir Lomov <lomov.vl <at> gmail.com>
>
> >> Hello,
> >> according to variable 'ispell-dictionary-base-alist' defined in
> >> 'ispell.el' if 'ispell-dictionary' is nil then it is considered as
> >> default value for dictionary. Unfortunately, when hunspell is used as
> >> ispell program function 'ispell-parse-hunspell-affix-file' fails because
> >> it doesn't expect nil as argument.
>
> >> I propose small and simple patch. I checked it starting emacs as:
> >> emacs -Q
> >> and evaluating in *scratch*:
> >> (setq ispell-program-name "hunspell")
> >> (setq ispell-really-hunspell t)
> >> after that I run 'M-$' while point is on first 's' of
> >> (message)
>
> >> In minibuffer I see
> >> MESSAGE is correct
>
> >> Without this patch the same steps lead to message
> >> ispell-phaf: No matching entry for nil.
>
> > Hi,
>
> > Cannot reproduce it here. By the way, once initialized for hunspell
> > ispell.el provides a match for default (nil) value, here
>
> > (nil [[:alpha:]] [^[:alpha:]] ['] nil (-B) nil utf-8)
>
> Wouldn't you mind to share how you get this?
Using 20131101 emacs-snapshot,
$ LC_ALL=C emacs-snapshot -Q &
In scratch buffer, type
(setq ispell-program-name "hunspell")
(setq ispell-dictionary nil)
and `eval-region' that region. Then run 'M-$' on a couple of words (file and
dictionary). This will make ispell.el be loaded and ispell process started,
messages buffer shows
Starting new Ispell process [hunspell::default] ...
Checking spelling of FILE...
FILE is correct
Checking spelling of DICTIONARY...
DICTIONARY is correct
Evaluating in the scratch buffer
(message "%s" (assoc nil ispell-hunspell-dictionary-alist))
I get (now default here is en_US)
(nil [[:alpha:]] [^[:alpha:]] ['0-9] t (-d en_US) nil utf-8)
Note that `ispell-hunspell-dictionary-alist' is not bound until ispell.el is
loaded, and that will not happen until you spellcheck for the first time (or
call a command that forces ispell.el load), so the first part of your check
should do nothing until then. If you get some result there please doublecheck
that you are not loading it from a different site.
PS: What is prin1?
Regards,
--
Agustin
This bug report was last modified 11 years and 239 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.