emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/indent-bars 95bc9f85e6 1/2: ensure indent-bars--ts-mode


From: ELPA Syncer
Subject: [elpa] externals/indent-bars 95bc9f85e6 1/2: ensure indent-bars--ts-mode gets fully disabled
Date: Wed, 18 Sep 2024 18:58:07 -0400 (EDT)

branch: externals/indent-bars
commit 95bc9f85e653d03beed8aa118850f94e720891a1
Author: JD Smith <93749+jdtsmith@users.noreply.github.com>
Commit: JD Smith <93749+jdtsmith@users.noreply.github.com>

    ensure indent-bars--ts-mode gets fully disabled
---
 indent-bars-ts.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/indent-bars-ts.el b/indent-bars-ts.el
index 07e1795156..a1ad2c6768 100644
--- a/indent-bars-ts.el
+++ b/indent-bars-ts.el
@@ -455,6 +455,10 @@ due to edits or contextual fontification."
     (advice-add #'jit-lock-context-fontify :around 
#'indent-bars-ts--context-fontify))
   (indent-bars-ts--fontify-buffer))
 
+(defun indent-bars-ts--disable ()
+  "Disable `indent-bars--ts-mode'."
+  (indent-bars--ts-mode -1))
+
 (defun indent-bars-ts--setup (lang)
   "Setup indent-bars treesitter support in this buffer for language LANG."
   (setq indent-bars-ts--parser
@@ -494,7 +498,7 @@ due to edits or contextual fontification."
     (setf (ibts/query ibtcs)
          (treesit-query-compile lang `([,@(mapcar #'list types)] @ctx)))
     (add-hook 'post-command-hook #'indent-bars-ts--update-scope nil t)
-    (add-hook 'indent-bars--teardown-functions 'indent-bars-ts--teardown nil 
t))
+    (add-hook 'indent-bars--teardown-functions 'indent-bars-ts--disable nil t))
   
   (indent-bars-ts--finalize-jit-lock))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]