GNU bug report logs - #30813
26.0.91; flyspell does not recheck after transpose-chars

Previous Next

Package: emacs;

Reported by: Aaron Jensen <aaronjensen <at> gmail.com>

Date: Wed, 14 Mar 2018 00:02:01 UTC

Severity: minor

Found in version 26.0.91

Full log


View this message in rfc822 format

From: Aaron Jensen <aaronjensen <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 30813 <at> 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
On Tue, Mar 13, 2018 at 9:56 PM, Aaron Jensen <aaronjensen <at> 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.




This bug report was last modified 7 years and 185 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.