From 30fa8040d265f6d44b2f87efe873e9e713ce5b05 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 21 Jan 2021 11:57:50 +0100 Subject: emacs: add a shortcut for `flyspell-buffer` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- .emacs.d/init.org | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to '.emacs.d/init.org') 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 == for checking words, and =M-= for moving into the next highl #+BEGIN_SRC elisp (global-set-key (kbd "") '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-") 'flyspell-check-next-highlighted-word) +(global-set-key (kbd "M-") '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: -- cgit v1.2.3