Subject: Re: bug#52331: M-$ doesn't respect subword mode

From: André A. Gomes <[email-masked]>
Date: Mon, 06 Dec 2021 16:34:43 +0000

Paul Pogonyshev <[email-masked]> writes:

> To reproduce:
>
> $ emacs --batch --eval "(global-subword-mode)" --eval "(insert
> \"getBanana\")" --eval "(ispell-word)"
>
> Expected output:
> ...
> BANANA is correct
>
> Expected output:
> ...
> Checking spelling of GETBANANA... 

Thank you for the bug report.

There's only one speller checker that handles camelCase (AFAIK), which
is aspell since 0.60.8.  If you're using it, then you can add the
following to your init file:

(setq ispell-extra-args '("--camel-case"))

However, and the Emacs maintainers will probably agree, the
responsibility of sending the "right" word to the ispell sub-process
should be on Emacs' side.  I.e., when subword-mode is on, there should
be a call to word-at-point before sending it to the spell checker.

-- 
André A. Gomes
"Free Thought, Free World"