From: Eli Zaretskii <eliz@gnu.org>
To: Aaron Jensen <aaronjensen@gmail.com>
Cc: 30813@debbugs.gnu.org
Subject: bug#30813: 26.0.91; flyspell does not recheck after transpose-chars
Date: Wed, 14 Mar 2018 07:28:43 +0200 [thread overview]
Message-ID: <3515DB7F-4590-497B-B576-AA63E66A00BA@gnu.org> (raw)
In-Reply-To: <CAHyO48z8BGBU0f+EUsu6TYpOKATXgFQ+ishBNtVRfgAowJbeAw@mail.gmail.com>
On March 14, 2018 7:17:14 AM GMT+02:00, Aaron Jensen <aaronjensen@gmail.com> wrote:
> On Tue, Mar 13, 2018 at 9:56 PM, Aaron Jensen <aaronjensen@gmail.com>
> wrote:
> > Upon some inspection, it seems flyspell is meant to be set up to do
> > this already. See `flyspell-check-pre-word-p', which returns nil in
> > this scenario. Perhaps it can be expanded to handle this scenario.
>
> For posterity, this works:
>
> (defun aj/flyspell-transpose-check ()
> (with-local-quit
> (when (and (eq this-command 'transpose-chars)
> flyspell-pre-point)
> (save-excursion
> (goto-char (- flyspell-pre-point 1))
> (flyspell-word)))))
>
> (advice-add 'flyspell-post-command-hook :before
> #'aj/flyspell-transpose-check)
>
> I'd be happy to include offer a patch for something like this, but I'm
> not sure if there's a better way and/or if it's nasty to hard-code a
> command like this.
What does that do when C-t is invoked with a numeric argument?
More generally, I think if we want to support transpose commands in flyspell,
we need special code for that, because those commands change two words,
which both need to be checked, something that flyspell-check-pre-word-p is not
designed to handle.
next prev parent reply other threads:[~2018-03-14 5:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-14 0:00 bug#30813: 26.0.91; flyspell does not recheck after transpose-chars Aaron Jensen
2018-03-14 3:41 ` Eli Zaretskii
2018-03-14 4:48 ` Aaron Jensen
2018-03-14 4:56 ` Aaron Jensen
2018-03-14 5:17 ` Aaron Jensen
2018-03-14 5:28 ` Eli Zaretskii [this message]
2018-03-14 5:34 ` Aaron Jensen
2018-03-14 5:59 ` Eli Zaretskii
2018-03-14 15:14 ` Aaron Jensen
2018-03-20 15:11 ` Eli Zaretskii
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3515DB7F-4590-497B-B576-AA63E66A00BA@gnu.org \
--to=eliz@gnu.org \
--cc=30813@debbugs.gnu.org \
--cc=aaronjensen@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.