Subject: Re: bug#25230: Patch to ispell.el to simplify use of [:alpha:] for CASECHARS in built-in dictionaries

From: Reuben Thomas <[email-masked]>
Date: Wed, 21 Dec 2016 17:31:46 +0000

On 21 December 2016 at 17:15, Eli Zaretskii <[email-masked]> wrote:

> > From: Reuben Thomas <[email-masked]>
> > Date: Wed, 21 Dec 2016 00:20:27 +0000
> > Cc: [email-masked]
> >
> > Here's an updated patch, which simply removes the overriding of the
> built-in
> > CASECHARS/NOT-CASECHARS settings for ispell dictionaries. It assumes
> that all other dictionaries (either
> > configured by the user or found by the various auto-scanning functions)
> will have sensible
> > CASECHARS/NOT-CASECHARS values, which is expected to be the case at
> present.
>
> Looks like you sent the wrong patch, as this:
>
> > diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
> > index 23ee412..82e5c2b 100644
> > --- a/lisp/textmodes/ispell.el
> > +++ b/lisp/textmodes/ispell.el
> > @@ -436,114 +436,70 @@ ispell-dictionary-base-alist
> >       ;; The default dictionary.  It may be English.aff, or any other
> >       ;; dictionary depending on locale and such things.  We should
> probably
> >       ;; ask ispell what dictionary it's using, but until we do that,
> let's
> > -     ;; just use a minimal regexp. [:alpha:] will later be set if
> possible.
> > -     "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1)
> > +     ;; just use a minimal regexp.
> > +     "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-B") nil iso-8859-1)
> >      ("american"                              ; Yankee English
> > -     "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1)
> > +     "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-B") nil iso-8859-1)
> >      ("brasileiro"                    ; Brazilian mode
> > -     "[A-Z\301\311\315\323\332\300\310\314\322\331\303\325\307\
> 334\302\312\324a-z\341\351\355\363\372\340\350\354\362\
> 371\343\365\347\374\342\352\364]"
> > -     "[^A-Z\301\311\315\323\332\300\310\314\322\331\303\325\
> 307\334\302\312\324a-z\341\351\355\363\372\340\350\354\
> 362\371\343\365\347\374\342\352\364]"
> > -     "[']" nil nil nil iso-8859-1)
> > +     "[[:alpha:]]" "[^[:alpha:]]" "[']" nil nil nil iso-8859-1)
>
> leaves the overriding in place.  Am I missing something?
>

​I'm baffled, I somehow inverted the sense of what I meant to do,
discarding the correct bit of the patch and keeping the incorrect bit.
Sorry about that. I attach what should now be the correct patch.

-- 
http://rrt.sc3d.org
From bdc58ec43c7ca6fcb232ba00ac936fc62ccff58d Mon Sep 17 00:00:00 2001
From: Reuben Thomas <[email-masked]>
Date: Wed, 21 Dec 2016 17:30:44 +0000
Subject: [PATCH 1/6] Keep default CASECHARS/NOT-CASECHARS for ispell built-in
 dictionaries

* lisp/textmodes/ispell.el (ispell-set-spellchecker-params): Do not
override CASECHARS and NOT-CASECHARS.  The ispell dictionaries
retain their hardwired values, and all other dictionaries are given
sensible defaults.
---
 lisp/textmodes/ispell.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 23ee412..7551d2f 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -1290,8 +1290,8 @@ ispell-set-spellchecker-params
         (cl-pushnew (if (cadr adict) ;; Do not touch hunspell uninitialized entries
                         (list
                          (nth 0 adict)   ; dict name
-                         "[[:alpha:]]"   ; casechars
-                         "[^[:alpha:]]"  ; not-casechars
+                         (nth 1 adict)   ; casechars
+                         (nth 2 adict)   ; not-casechars
                          (nth 3 adict)   ; otherchars
                          (nth 4 adict)   ; many-otherchars-p
                          (nth 5 adict)   ; ispell-args
-- 
2.7.4