GNU bug report logs - #35397
flyspell-mode affects delete-selection-mode

Previous Next

Package: emacs;

Reported by: Евгений Курневский <kurnevsky <at> gmail.com>

Date: Tue, 23 Apr 2019 15:46:03 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: Евгений Курневский
 <kurnevsky <at> gmail.com>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 35397 <at> debbugs.gnu.org
Subject: bug#35397: flyspell-mode affects delete-selection-mode
Date: Sun, 30 Jun 2019 17:53:56 +0000
[Message part 1 (text/plain, inline)]
Yes, you are right, the problem is with highlighting. But there is another
undesired consequence - flyspell mode prevents `company` popup in this
case, it appears only after second character is typed. I investigated it a
bit and it seems it's caused by `sit-for` used inside
`flyspell-check-word-p`. So I came up with a workaround that solves both
these issues:

(advice-add 'flyspell-check-word-p :around (lambda (orig-fun &rest args)
                                             (if (eq this-command
'self-insert-command)
                                               (memq
(get-char-code-property (char-before) 'general-category) '(Zs Zl Zp))
                                               (apply orig-fun args))))

This makes flyspell return immediately when `self-insert-command` was used.
[Message part 2 (text/html, inline)]

This bug report was last modified 5 years and 299 days ago.

Previous Next


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