app/write: major refactor+rewrite
+ Make synosaurus unconditional + Move much of +write-mode into its hook + Conform README.org to template and expand it + Try to guess langtool-language-tool-jar + Update init.example.el entry + Remove redundant variables + Add +write-text-scale & +text-line-spacing variables
This commit is contained in:
parent
896ca67076
commit
3080b68c84
5 changed files with 178 additions and 76 deletions
|
@ -2,18 +2,19 @@
|
|||
|
||||
;;;###autoload
|
||||
(define-minor-mode +write-mode
|
||||
"TODO"
|
||||
"Turns Emacs into a more comfortable writing environment and word processor."
|
||||
:init-value nil
|
||||
:keymap nil
|
||||
(let ((arg (if +write-mode +1 -1))
|
||||
(iarg (if +write-mode -1 +1)))
|
||||
(text-scale-set (if +write-mode 2 0))
|
||||
(doom/toggle-line-numbers iarg)
|
||||
(setq-local visual-fill-column-center-text +write-mode)
|
||||
(visual-fill-column-mode arg)
|
||||
(visual-line-mode arg)
|
||||
(when (eq major-mode 'org-mode)
|
||||
(mixed-pitch-mode arg)
|
||||
(+org-pretty-mode arg))
|
||||
(setq line-spacing (if +write-mode 4))))
|
||||
(setq-local visual-fill-column-center-text t)
|
||||
(when +write-text-scale
|
||||
(text-scale-set (if +write-mode 2 0)))
|
||||
(when +write-line-spacing
|
||||
(setq-local line-spacing +write-line-spacing)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +write|init-org-mode ()
|
||||
"Initializes `org-mode' specific settings for `+write-mode'."
|
||||
(when (eq major-mode 'org-mode)
|
||||
(let ((arg (if +write-mode +1 -1)))
|
||||
(+org-pretty-mode arg)
|
||||
(org-indent-mode (if +write-mode -1 +1)))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue