Refactor nasty zen-mode customisations
I know better now
This commit is contained in:
parent
1118bf0e77
commit
c990746b91
24
config.org
24
config.org
|
@ -2689,14 +2689,6 @@ tweaks. Namely:
|
||||||
(setq +zen--original-mixed-pitch-mode-p mixed-pitch-mode)
|
(setq +zen--original-mixed-pitch-mode-p mixed-pitch-mode)
|
||||||
(funcall (if +zen-serif-p #'mixed-pitch-serif-mode #'mixed-pitch-mode) 1))
|
(funcall (if +zen-serif-p #'mixed-pitch-serif-mode #'mixed-pitch-mode) 1))
|
||||||
(funcall #'mixed-pitch-mode (if +zen--original-mixed-pitch-mode-p 1 -1)))))
|
(funcall #'mixed-pitch-mode (if +zen--original-mixed-pitch-mode-p 1 -1)))))
|
||||||
(pushnew! writeroom--local-variables
|
|
||||||
'display-line-numbers
|
|
||||||
'visual-fill-column-width
|
|
||||||
'org-adapt-indentation
|
|
||||||
'org-modern-mode
|
|
||||||
'org-modern-star
|
|
||||||
'org-modern-hide-stars)
|
|
||||||
(add-hook 'writeroom-mode-enable-hook
|
|
||||||
(defun +zen-prose-org-h ()
|
(defun +zen-prose-org-h ()
|
||||||
"Reformat the current Org buffer appearance for prose."
|
"Reformat the current Org buffer appearance for prose."
|
||||||
(when (eq major-mode 'org-mode)
|
(when (eq major-mode 'org-mode)
|
||||||
|
@ -2710,16 +2702,24 @@ tweaks. Namely:
|
||||||
(org-modern-mode -1)
|
(org-modern-mode -1)
|
||||||
(org-modern-mode 1))
|
(org-modern-mode 1))
|
||||||
(setq
|
(setq
|
||||||
+zen--original-org-indent-mode-p org-indent-mode
|
+zen--original-org-indent-mode-p org-indent-mode)
|
||||||
(org-indent-mode -1))))
|
(org-indent-mode -1)))
|
||||||
(add-hook 'writeroom-mode-disable-hook
|
|
||||||
(defun +zen-nonprose-org-h ()
|
(defun +zen-nonprose-org-h ()
|
||||||
"Reverse the effect of `+zen-prose-org'."
|
"Reverse the effect of `+zen-prose-org'."
|
||||||
(when (eq major-mode 'org-mode)
|
(when (eq major-mode 'org-mode)
|
||||||
(when (bound-and-true-p org-modern-mode)
|
(when (bound-and-true-p org-modern-mode)
|
||||||
(org-modern-mode -1)
|
(org-modern-mode -1)
|
||||||
(org-modern-mode 1))
|
(org-modern-mode 1))
|
||||||
(when +zen--original-org-indent-mode-p (org-indent-mode 1)))))))
|
(when +zen--original-org-indent-mode-p (org-indent-mode 1))))
|
||||||
|
(pushnew! writeroom--local-variables
|
||||||
|
'display-line-numbers
|
||||||
|
'visual-fill-column-width
|
||||||
|
'org-adapt-indentation
|
||||||
|
'org-modern-mode
|
||||||
|
'org-modern-star
|
||||||
|
'org-modern-hide-stars)
|
||||||
|
(add-hook 'writeroom-mode-enable-hook #'+zen-prose-org-h)
|
||||||
|
(add-hook 'writeroom-mode-disable-hook #'+zen-nonprose-org-h))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+attr_html: :class invertible :alt Writeroom applied to an Org file
|
#+attr_html: :class invertible :alt Writeroom applied to an Org file
|
||||||
|
|
Loading…
Reference in a new issue