[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/indent-bars ce84791086 208/431: Teardown TS forms and P
From: |
ELPA Syncer |
Subject: |
[elpa] externals/indent-bars ce84791086 208/431: Teardown TS forms and PCH on main mode teardown |
Date: |
Mon, 16 Sep 2024 12:59:29 -0400 (EDT) |
branch: externals/indent-bars
commit ce84791086995107d98a56507914eac847a941ee
Author: JD Smith <93749+jdtsmith@users.noreply.github.com>
Commit: JD Smith <93749+jdtsmith@users.noreply.github.com>
Teardown TS forms and PCH on main mode teardown
---
indent-bars-ts.el | 10 +++++++++-
indent-bars.el | 5 ++++-
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/indent-bars-ts.el b/indent-bars-ts.el
index 6639228272..1a71357513 100644
--- a/indent-bars-ts.el
+++ b/indent-bars-ts.el
@@ -311,6 +311,13 @@ performed."
(setq indent-bars-ts-out-scope-style (indent-bars--new-style)))
(put 'indent-bars-ts-setup :init-scope t)))
+(defun indent-bars-ts--teardown ()
+ "Teardown indent-bars-ts."
+ (setq
+ indent-bars--display-form nil
+ indent-bars--handle-blank-lines-form nil)
+ (remove-hook 'post-command-hook #'indent-bars-ts--update-scope t))
+
;;;###autoload
(defun indent-bars-ts-setup ()
"Setup indent-bars for using with treesiter."
@@ -349,8 +356,9 @@ performed."
indent-bars--display-form '(indent-bars-ts--display)
indent-bars--handle-blank-lines-form
'(indent-bars-ts--handle-blank-lines))
(setf (ibts/query ibtcs)
- (treesit-query-compile lang `([,@(mapcar #'list types)] @ctx))))))
+ (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))))
(provide 'indent-bars-ts)
;;; indent-bars-ts.el ends here
diff --git a/indent-bars.el b/indent-bars.el
index 59c5af63a3..7f669d6b62 100644
--- a/indent-bars.el
+++ b/indent-bars.el
@@ -1342,6 +1342,8 @@ Adapted from `highlight-indentation-mode'."
(indent-bars--setup-font-lock)
(font-lock-flush))
+
+(defvar indent-bars--teardown-functions nil)
(defun indent-bars-teardown ()
"Tears down indent-bars."
(dolist (s indent-bars--styles)
@@ -1365,7 +1367,8 @@ Adapted from `highlight-indentation-mode'."
(remove-hook 'text-scale-mode-hook #'indent-bars--resize-stipple t)
(remove-hook 'post-command-hook #'indent-bars--highlight-current-depth t)
(remove-hook 'font-lock-extend-region-functions
- #'indent-bars--extend-blank-line-regions t))
+ #'indent-bars--extend-blank-line-regions t)
+ (apply #'run-hooks indent-bars--teardown-functions))
(defun indent-bars-reset ()
"Reset indent-bars config."
- [elpa] externals/indent-bars 62c76468eb 202/431: Merge branch 'main' into treesit-scope, (continued)
- [elpa] externals/indent-bars 62c76468eb 202/431: Merge branch 'main' into treesit-scope, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 6e2f93d194 193/431: ib: improve docs and add shorthands, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars a195a06b8c 185/431: Correctly call run-at-time, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars ee36aa78ae 192/431: ts: emphasis scope algorithm added, with struct shorthands, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars f2d9c0f95b 188/431: Improve documentation, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars acb9ded166 178/431: docstring and comment improvements, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars d4ea40e3bb 195/431: relabel faded -> out-of-scope, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 09b972f957 156/431: Update README.md, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 9cf88e1403 176/431: Update README.md, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars edab5ee530 203/431: Comment/docstring improvements, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars ce84791086 208/431: Teardown TS forms and PCH on main mode teardown,
ELPA Syncer <=
- [elpa] externals/indent-bars 902713b115 198/431: create new -form vars for font-lock keyword callback flexibility, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 4d4f041cfc 205/431: Make sure beg/end markers point somewhere, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars a6dbf67f74 245/431: Section rename/unused var cleanup, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars fffa4fe52d 236/431: Tweak remap removal., ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 19dd505850 242/431: Reorg stipple display section, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 08fbce35de 214/431: Move treesitter setup above resize (which uses it), ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 070ab26c6d 197/431: new 'force option for init-scope, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 4583e3e9f5 240/431: Add reset to enable-theme-functions, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 301c97550b 219/431: Correctly initialize 'color alt custom (unspecified), ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 315aaaab74 232/431: Correct calls to depth-palette/get-color with STYLE, ELPA Syncer, 2024/09/16