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

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

[nongnu] elpa/clojure-ts-mode 61fc513590 1/4: clojure-ts--ensure-grammar


From: ELPA Syncer
Subject: [nongnu] elpa/clojure-ts-mode 61fc513590 1/4: clojure-ts--ensure-grammars: Add comment about use of dynamic scope
Date: Sun, 10 Sep 2023 15:59:00 -0400 (EDT)

branch: elpa/clojure-ts-mode
commit 61fc513590ca3ed788a5568623ae419cd3f554f7
Author: Danny Freeman <danny@dfreeman.email>
Commit: Danny Freeman <danny@dfreeman.email>

    clojure-ts--ensure-grammars: Add comment about use of dynamic scope
---
 clojure-ts-mode.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/clojure-ts-mode.el b/clojure-ts-mode.el
index 10efd3e10e..1033810da6 100644
--- a/clojure-ts-mode.el
+++ b/clojure-ts-mode.el
@@ -828,6 +828,9 @@ forms like deftype, defrecord, reify, proxy, etc."
 (defun clojure-ts--ensure-grammars ()
   "Install required language grammars if not already available."
   (when clojure-ts-ensure-grammars
+    ;; `treesit-language-source-alist' is dynamically scoped.
+    ;; Setting it here allows `treesit-install-language-gramamr' to pick up
+    ;; the grammar recipes we want without modifying what the user has set.
     (let ((treesit-language-source-alist clojure-ts-grammar-recipes))
       (unless (treesit-language-available-p 'clojure nil)
         (message "Installing clojure tree-sitter grammar.")



reply via email to

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