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

From: Eli Zaretskii <[email-masked]>
Date: Mon, 19 Dec 2016 18:23:26 +0200

> From: Reuben Thomas <[email-masked]>
> Date: Mon, 19 Dec 2016 12:28:57 +0000
> 
> In ispell-set-spellchecker-params, there is code that used to be run conditionally on support for POSIX
> character classes, which sets all the CASECHARS and NOT-CASECHARS entries for built-in dictionaries to
> [[:alpha:]] and [^[:alpha:]] respectively.
> 
> There is no point doing this unconditionally, so instead, put these character classes directly into the initial
> values used in ispell-dictionary-base-alist. This change also makes the variable's initialization easier to read.
> 
> The attached patch makes these changes.
> 
> -     "[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)

You are assuming that [[:alpha:]] and [A-Za-z] are identical.  But
they are far from being identical, not since Emacs 25.1.  I mentioned
this in another thread today.

>      ("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)

Same here: [[:alpha:]] is much broader now than any set of characters
supported by a single language.

In any case, these settings are for Ispell, which only supports
single-byte encodings.  We cannot use arbitrary characters with it.

IOW, I don't think this patch is in the right direction.

Thanks.