From: Eli Zaretskii <eliz@gnu.org>
To: "André A. Gomes" <andremegafone@gmail.com>
Cc: 52331@debbugs.gnu.org, pogonyshev@gmail.com
Subject: bug#52331: M-$ doesn't respect subword mode
Date: Mon, 06 Dec 2021 19:45:35 +0200 [thread overview]
Message-ID: <83ee6p1vb4.fsf@gnu.org> (raw)
In-Reply-To: <87mtldy7hj.fsf@gmail.com> (message from André A. Gomes on Mon, 06 Dec 2021 17:21:28 +0000)
> From: André A. Gomes <andremegafone@gmail.com>
> Cc: pogonyshev@gmail.com, 52331@debbugs.gnu.org
> Date: Mon, 06 Dec 2021 17:21:28 +0000
>
> > It's not that easy, unfortunately. ispell.el has its own rules for
> > what is a word, and the rules aren't static, they are determined
> > dynamically by the definition of the dictionary. That's because of at
> > least 2 reasons: (1) the rules must match what the dictionary
> > considers a word, and (2) spell-checking is expected to work in
> > buffers that mix several languages, so the rules need to be sensitive
> > to the language of the dictionary and reject "words" whose letters are
> > not part of the language.
>
> Correct, my comment was over simplistic. But I don't see where my
> reasoning fails. I can't think of an example where calling
> word-at-point before the ispell rules kick in would make harm. What am
> I missing?
See ispell-get-word, I think it will explain what I meant. This is
what ispell.el is using to determine what is a "word".
> > So perhaps a better approach is to teach subword-mode about the word
> > rules of ispell.el, not the other way around. Patches welcome.
>
> I don't see how this could help. Care to expand a bit?
subword-mode uses regular expressions to find where the word begins
and ends. Either use different regexps (derived from what ispell.el
uses) when spell-checking, or make ispell.el define its own
subword-forward/backward-functions for subword-mode to use instead of
its defaults.
prev parent reply other threads:[~2021-12-06 17:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-06 15:09 bug#52331: M-$ doesn't respect subword mode Paul Pogonyshev
2021-12-06 16:34 ` André A. Gomes
2021-12-06 16:46 ` Eli Zaretskii
2021-12-06 17:21 ` André A. Gomes
2021-12-06 17:45 ` Eli Zaretskii [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83ee6p1vb4.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=52331@debbugs.gnu.org \
--cc=andremegafone@gmail.com \
--cc=pogonyshev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).