summaryrefslogtreecommitdiffstats
path: root/lisp/init-mac.el
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2018-05-30 13:57:58 +0200
committerMartin Polden <mpolden@mpolden.no>2018-05-30 13:57:58 +0200
commit958cd5c066d2a10e3b195bf1c34f2dfe618332a0 (patch)
treea2d71947ff169c6adfe589507d6712ce18127531 /lisp/init-mac.el
parente0368eeb0232579f9e34576841272fee249ae04b (diff)
Only enable auto-composition-mode in prog-mode
Diffstat (limited to 'lisp/init-mac.el')
-rw-r--r--lisp/init-mac.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/init-mac.el b/lisp/init-mac.el
index f794048..6f6df8f 100644
--- a/lisp/init-mac.el
+++ b/lisp/init-mac.el
@@ -37,6 +37,13 @@
(set-char-table-range composition-function-table (car char-regexp)
`([,(cdr char-regexp) 0 font-shape-gstring])))))
+ ;; ligatures may be expensive so only enable them in prog-mode
+ (use-package composite
+ :ensure nil ;; package is bundled with emacs
+ :config
+ (global-auto-composition-mode -1)
+ (add-hook 'prog-mode-hook 'auto-composition-mode))
+
;; fira code retina at 14 pt may result in (window-total-height) being exactly
;; 80 which makes sensible splitting less sensible
;;