TransWikia.com

flyspell's highlight cleared after a "save word" action

Emacs Asked by xuhdev on December 7, 2020

After running flyspell-buffer, all misspelled words are highlighted. However, after saving a word, all of the highlighting is gone. How can I avoid that? My flyspell-persistent-highlight is set t.

One Answer

Via https://www.emacswiki.org/emacs/FlySpell#toc9 and https://www.reddit.com/r/emacs/comments/4oc7pg/spellcheck_flyspellmode_underlines_disappear_when/d5l9vtt/ I found this solution:

(defun flyspell-buffer-after-pdict-save (&rest _)
  (flyspell-buffer))

(advice-add 'ispell-pdict-save :after #'flyspell-buffer-after-pdict-save)

Unfortunately this seems to trigger a bit too often: flyspell-buffer now also runs after correcting a word or even after dismissing the mouse-2 menu without any action.

Answered by m4lvin on December 7, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP