diff options
| author | Miquel Sabaté Solà <msabate@suse.com> | 2020-02-17 16:20:47 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <msabate@suse.com> | 2020-02-17 16:20:47 +0100 |
| commit | c3b77995ae770e7d5f1d8b84a0d7d49dfd9d2d48 (patch) | |
| tree | c4578689831ec244d36fb401bf2b68b6f418004c /.emacs.d/init.org | |
| parent | b0b518badc81bac885e54939cc727be7c0dfeb47 (diff) | |
| download | dotfiles-c3b77995ae770e7d5f1d8b84a0d7d49dfd9d2d48.tar.gz dotfiles-c3b77995ae770e7d5f1d8b84a0d7d49dfd9d2d48.zip | |
emacs: outline all headlines when running flyspell
When calling `flyspell-check-next-highlighted-word', expand all headlines, so
flyspell does not struggle with hidden text.
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to '.emacs.d/init.org')
| -rw-r--r-- | .emacs.d/init.org | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/.emacs.d/init.org b/.emacs.d/init.org index d07b784..0966663 100644 --- a/.emacs.d/init.org +++ b/.emacs.d/init.org @@ -796,6 +796,12 @@ Let's use =<f8>= for checking words, and =M-<f8>= for moving into the next highl (defun flyspell-check-next-highlighted-word () "Custom function to spell check next highlighted word" (interactive) + + ;; If we are in org mode, unfold everything, since flyspell does not work + ;; smoothly with folded stuff. + (when (string= major-mode "org-mode") + (outline-show-all)) + (flyspell-goto-next-error) (ispell-word)) |
