GNU bug report logs -
#23097
24.5; ispell.el: lines with both CASECHARS and NOT-CASECHARS get sent to the spell checker
Previous Next
Full log
View this message in rfc822 format
Each entry ispell-dictionary-alist has elements called CASECHARS and
NOT-CASECHARS. They are used for defining what gets sent to the spell
checker and what does not.
One use case for them is that, if you have two dictionaries for
languages with totally different alphabets, you can spellcheck a file
where both languages are mixed together. In theory.
Here's what happens in practice:
If line contains only CASECHARS, it gets sent to the spell checker.
If line contains only NOT-CASECHARS, it does not get sent to the spell
checker.
If line contains both CASECHARS and NOT-CASECHARS, the whole line gets
sent to the spell checker.
Sending the whole line makes NOT-CASECHARS pretty useless. I think the
reasonable behavior in this case would be sending the line word by word.
Here's how to repeat this with aspell.
1. Starting from emacs -Q eval this:
(setq ispell-program-name "aspell")
(defun ispell-set-my-dictionaries()
(setq ispell-dictionary-alist (delq (assoc "english"
ispell-dictionary-alist) ispell-dictionary-alist))
(add-to-list 'ispell-dictionary-alist
'("english" "[kcat]" "[dogh]" "[']" nil ("-B") nil
iso-8859-1)))
(advice-add 'ispell-set-spellchecker-params :after
#'ispell-set-my-dictionaries)
2. ispell-change-dictionary to english.
3. ispell-buffer a buffer containing this:
kat
doh
kat doh
"Kat" at the first line would get sent to aspell, since it passes
CASECHARS. This is fine. "Doh" at the second line would be ignored,
since it's not in CASECHARS. This is fine too. At the line with both
words, not only "kat" would get sent, but also "doh" and that's what we
don't want to happen.
--
Best Regards,
Nikolay Kudryavtsev
This bug report was last modified 4 years and 223 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.