From: Aaron Jensen <aaronjensen@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 30813@debbugs.gnu.org
Subject: bug#30813: 26.0.91; flyspell does not recheck after transpose-chars
Date: Tue, 13 Mar 2018 22:17:14 -0700 [thread overview]
Message-ID: <CAHyO48z8BGBU0f+EUsu6TYpOKATXgFQ+ishBNtVRfgAowJbeAw@mail.gmail.com> (raw)
In-Reply-To: <CAHyO48zhpj2sNxp=t-uOcA7p+Qu-30QWjEOUg8Xjx4it=XGmXA@mail.gmail.com>
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.
next prev parent reply other threads:[~2018-03-14 5:17 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 [this message]
2018-03-14 5:28 ` Eli Zaretskii
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
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=CAHyO48z8BGBU0f+EUsu6TYpOKATXgFQ+ishBNtVRfgAowJbeAw@mail.gmail.com \
--to=aaronjensen@gmail.com \
--cc=30813@debbugs.gnu.org \
--cc=eliz@gnu.org \
/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).