summaryrefslogtreecommitdiff
path: root/.config/emacs/config.org
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-08-13 01:11:40 +0200
committerThomas Voss <mail@thomasvoss.com> 2023-08-13 01:11:40 +0200
commit4ee836a82b22a961db1bacc4bb3531c7b38ad34f (patch)
tree0a7270cad2e1e8ecaa72a04204ae4350c7e0dcfe /.config/emacs/config.org
parente61e15b959fd6e331a7ec70a68a559f144ba5863 (diff)
emacs: Only add ts hook if mode exists
Diffstat (limited to '.config/emacs/config.org')
-rw-r--r--.config/emacs/config.org6
1 files changed, 3 insertions, 3 deletions
diff --git a/.config/emacs/config.org b/.config/emacs/config.org
index fd071e0..4d71eb2 100644
--- a/.config/emacs/config.org
+++ b/.config/emacs/config.org
@@ -810,9 +810,9 @@ with a custom function that reads a list of mode-specific indentation settings.
evil-shift-width width)
(mm-for-each extra (setq x width)))))
(add-hook (mm-mode-to-hook mode) callback 95)
- (let ((ts-mode (mm-mode-to-ts-mode mode)))
- (when (boundp ts-mode)
- (add-hook (mm-mode-to-hook ts-mode) callback 95))))))
+ (let ((ts-hook (mm-mode-to-hook (mm-mode-to-ts-mode mode))))
+ (when (boundp ts-hook)
+ (add-hook ts-hook callback 95))))))
(mm-set-indentation-settings)