2017-06-08 11:47:56 +02:00
|
|
|
;;; app/write/autoload.el -*- lexical-binding: t; -*-
|
2017-03-08 21:34:03 -05:00
|
|
|
|
2018-04-28 03:28:59 -04:00
|
|
|
;;;###autoload
|
|
|
|
(defvar +write-mode-map (make-sparse-keymap)
|
|
|
|
"TODO")
|
|
|
|
|
2017-03-08 21:34:03 -05:00
|
|
|
;;;###autoload
|
|
|
|
(define-minor-mode +write-mode
|
2018-02-13 17:50:58 -05:00
|
|
|
"Turns Emacs into a more comfortable writing environment and word processor."
|
2017-03-08 21:34:03 -05:00
|
|
|
:init-value nil
|
2018-04-28 03:28:59 -04:00
|
|
|
:keymap +write-mode-map
|
2018-02-13 17:50:58 -05:00
|
|
|
(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)))
|
2017-04-28 03:45:54 -04:00
|
|
|
|
2018-02-13 17:50:58 -05:00
|
|
|
;;;###autoload
|
|
|
|
(defun +write|init-org-mode ()
|
|
|
|
"Initializes `org-mode' specific settings for `+write-mode'."
|
|
|
|
(when (eq major-mode 'org-mode)
|
2018-07-31 18:41:34 +02:00
|
|
|
(let ((arg (if +write-mode +1 -1)))
|
2018-02-13 17:50:58 -05:00
|
|
|
(+org-pretty-mode arg)
|
|
|
|
(org-indent-mode (if +write-mode -1 +1)))))
|