aboutsummaryrefslogtreecommitdiff
path: root/.emacs.d
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <msabate@suse.com>2021-01-21 11:57:50 +0100
committerMiquel Sabaté Solà <msabate@suse.com>2021-01-21 11:57:50 +0100
commit30fa8040d265f6d44b2f87efe873e9e713ce5b05 (patch)
tree27ea6118cd00a239babc80d1b68b5d1d7113b73b /.emacs.d
parent9d52f5ad672d2b17e26a29989d105a35b1d2fcb7 (diff)
downloaddotfiles-30fa8040d265f6d44b2f87efe873e9e713ce5b05.tar.gz
dotfiles-30fa8040d265f6d44b2f87efe873e9e713ce5b05.zip
emacs: add a shortcut for `flyspell-buffer`
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to '.emacs.d')
-rw-r--r--.emacs.d/init.org15
1 files changed, 1 insertions, 14 deletions
diff --git a/.emacs.d/init.org b/.emacs.d/init.org
index eac2600..687ba28 100644
--- a/.emacs.d/init.org
+++ b/.emacs.d/init.org
@@ -857,20 +857,7 @@ Let's use =<f8>= for checking words, and =M-<f8>= for moving into the next highl
#+BEGIN_SRC elisp
(global-set-key (kbd "<f8>") 'ispell-word)
-
-(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))
-
-(global-set-key (kbd "M-<f8>") 'flyspell-check-next-highlighted-word)
+(global-set-key (kbd "M-<f8>") 'flyspell-buffer)
#+END_SRC
If possible, use [[https://hunspell.github.io/][hunspell]] instead of aspell. This program is used by LibreOffice, Firefox, etc. so it's pretty reliable and it supports rather complex languages such as Hungarian. The language being picked is the one from =LC_ALL= and similar environment variables. You can change that by setting =ispell-local-dictionary= and similar: