From d73f2e44eb49ad8d14f72835df922a92fd731052 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 14 Jan 2018 00:24:21 -0500 Subject: Don't use font lock in ledger mode --- init.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/init.el b/init.el index ec452dd..a815c01 100644 --- a/init.el +++ b/init.el @@ -1864,6 +1864,18 @@ (setq truncate-lines km/writeroom-old-truncate-lines))) (add-hook 'writeroom-mode-hook #'km/writeroom-setup)) +(use-package ledger-mode + :init + (and (boundp 'font-lock-global-modes) + (pcase font-lock-global-modes + ('t + (setq font-lock-global-modes '(not ledger-mode))) + (`(not . ,_) + (add-to-list 'font-lock-global-modes 'ledger-mode t)) + (`(,_ . ,_) + (setq font-lock-global-modes + (delq 'ledger-mode font-lock-global-modes)))))) + ;;; Language modes -- cgit v1.2.3