From 9dffe32c72d6da58d9e7aa2bb8530bf9ff2eb8f4 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Mon, 23 Sep 2024 03:44:36 +0200 Subject: emacs: Don’t create -ts-ts-mode hooks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/emacs/init.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '.config/emacs') diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 1fc33f8..e9d52e0 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -360,9 +360,9 @@ indentation-width.") evil-shift-width width) (dolist (var extra) (set var width))))) - (dolist (hook (list (x-mode-to-hook mode) - (x-mode-to-hook (x-mode-to-ts-mode mode)))) - (add-hook hook callback 95))))) + (add-hook (x-mode-to-hook mode) callback 95) + (unless (string-prefix-p "-ts-mode" (symbol-name mode)) + (add-hook (x-mode-to-hook (x-mode-to-ts-mode mode)) callback 95))))) (defun x-set-tabsize () "Set the tabsize for the current buffer. If the current buffers major -- cgit v1.2.3