From 78b99060c498e9172150ad6bfe5fff0acbb27c98 Mon Sep 17 00:00:00 2001 From: Gerard Vermeulen Date: Fri, 26 Jan 2024 13:09:42 +0100 Subject: [PATCH] Enable `writegood-mode' automatically in text modes. --- README.org | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.org b/README.org index d1c3127..a273111 100644 --- a/README.org +++ b/README.org @@ -4666,9 +4666,12 @@ the [[https://github.com/gromnitsky/wordnut#readme][wordnut]] prerequisites. :CUSTOM_ID: sec:writing-writegood-mode :END: -[[https://github.com/bnbeckwith/writegood-mode#readme][Writegood mode]] is a minor mode to aid in finding common writing problems. The post -[[http://matt.might.net/articles/shell-scripts-for-passive-voice-weasel-words-duplicates/][Matt Might's "My Ph.D. advisor rewrote himself in bash" scripts]] inspired this mode. -Listing [[lst:configure-writegood-mode]] configures [[https://github.com/bnbeckwith/writegood-mode#readme][writegood mode]]. +[[https://github.com/bnbeckwith/writegood-mode#readme][Writegood mode]] is a minor mode to aid in finding common writing problems. The +post [[http://matt.might.net/articles/shell-scripts-for-passive-voice-weasel-words-duplicates/][Matt Might's "My Ph.D. advisor rewrote himself in bash" scripts]] inspired +this mode. Listing [[lst:configure-writegood-mode]] configures [[https://github.com/bnbeckwith/writegood-mode#readme][writegood mode]] and +enables =writegood-mode= for =text-mode= buffers. The best way to apply it to +this buffer is by typing {{{kbd(C-c C-e t U)}}} to export the it to a +=text-mode= buffer. #+caption[Configure =writegood-mode=]: #+caption: Configure =writegood-mode=. @@ -4676,7 +4679,8 @@ Listing [[lst:configure-writegood-mode]] configures [[https://github.com/bnbeckw #+begin_src emacs-lisp -n :results silent (when (and (ensure-package-installation 'writegood-mode) (fboundp 'writegood-mode)) - (global-set-key (kbd "C-c g") #'writegood-mode)) + (global-set-key (kbd "C-c g") #'writegood-mode) + (add-hook 'after-change-major-mode-hook #'writegood-mode)) #+end_src * Programming Tools