From: Armaan Bhojwani Date: Sun, 30 May 2021 22:47:51 +0000 (-0400) Subject: Play with auto-fill-mode and flyspell-mode hooks X-Git-Url: https://git.armaanb.net/?p=config.org.git;a=commitdiff_plain;h=a2133dfae29f92286a4db541de2011e75bf66e25 Play with auto-fill-mode and flyspell-mode hooks --- diff --git a/config.org b/config.org index deb1c21..6c8241e 100644 --- a/config.org +++ b/config.org @@ -136,6 +136,12 @@ Soft wrap words and do operations by visual lines in some modes. mu4e-view-mode-hook)) (add-hook hook (lambda () (visual-line-mode 1)))) #+end_src +** Auto fill mode +#+begin_src emacs-lisp + (dolist (hook '(scdoc-mode-hook + mu4e-compose-mode-hook)) + (add-hook hook (lambda () (auto-fill-mode 1)))) +#+end_src ** Display number of matches in search #+begin_src emacs-lisp (use-package anzu @@ -367,7 +373,6 @@ Contexts are a not very well known feature of mu4e that makes it super easy to m :query "maildir:\"/personal/INBOX\" or maildir:\"/school/INBOX\"" :key ?b)) :hook ((mu4e-compose-mode . flyspell-mode) - (mu4e-compose-mode . auto-fill-mode) (message-send-hook . (lambda () (unless (yes-or-no-p "Ya sure 'bout that?") (signal 'quit nil)))))) #+end_src @@ -605,7 +610,9 @@ Automatically indent after every change. I'm not sure how much I like this. It s ** Spell checking Spell check in text mode, and in prog-mode comments. #+begin_src emacs-lisp - (dolist (hook '(text-mode-hook)) + (dolist (hook '(text-mode-hook + markdown-mode-hook + scdoc-mode-hook)) (add-hook hook (lambda () (flyspell-mode)))) (dolist (hook '(change-log-mode-hook log-edit-mode-hook)) (add-hook hook (lambda () (flyspell-mode -1))))