[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#30813: 26.0.91; flyspell does not recheck after transpose-chars
From: |
Eli Zaretskii |
Subject: |
bug#30813: 26.0.91; flyspell does not recheck after transpose-chars |
Date: |
Wed, 14 Mar 2018 07:28:43 +0200 |
User-agent: |
K-9 Mail for Android |
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.
- bug#30813: 26.0.91; flyspell does not recheck after transpose-chars, Aaron Jensen, 2018/03/13
- bug#30813: 26.0.91; flyspell does not recheck after transpose-chars, Eli Zaretskii, 2018/03/13
- bug#30813: 26.0.91; flyspell does not recheck after transpose-chars, Aaron Jensen, 2018/03/14
- bug#30813: 26.0.91; flyspell does not recheck after transpose-chars, Aaron Jensen, 2018/03/14
- bug#30813: 26.0.91; flyspell does not recheck after transpose-chars, Aaron Jensen, 2018/03/14
- bug#30813: 26.0.91; flyspell does not recheck after transpose-chars,
Eli Zaretskii <=
- bug#30813: 26.0.91; flyspell does not recheck after transpose-chars, Aaron Jensen, 2018/03/14
- bug#30813: 26.0.91; flyspell does not recheck after transpose-chars, Eli Zaretskii, 2018/03/14
- bug#30813: 26.0.91; flyspell does not recheck after transpose-chars, Aaron Jensen, 2018/03/14
- bug#30813: 26.0.91; flyspell does not recheck after transpose-chars, Eli Zaretskii, 2018/03/20