Skip to content

Commit

Permalink
fix(+writing-mode): fix enable/disable hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Oct 16, 2023
1 parent 24be9cf commit 7f21ba9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/extras/me-writing-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,14 @@
(setq-local +writing--line-nums-active-p display-line-numbers-type)
(display-line-numbers-mode -1))
(when (derived-mode-p 'org-mode) (+writing--scale-up-org-latex))
(run-hooks +writing-mode-enable-hook))
(run-hooks '+writing-mode-enable-hook))
;; Disable
(kill-local-variable 'visual-fill-column-center-text)
(kill-local-variable 'visual-fill-column-width)
(when (derived-mode-p 'org-mode) (+writing--scale-down-org-latex))
(when (and +writing--line-nums-active-p mixed-pitch-mode-p)
(display-line-numbers-mode +writing--line-nums-active-p)))
(display-line-numbers-mode +writing--line-nums-active-p))
(run-hooks '+writing-mode-disable-hook))

(visual-fill-column-mode (if +writing-mode 1 -1))

Expand Down

0 comments on commit 7f21ba9

Please sign in to comment.