[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/clojure-ts-mode 5f16fb8dbc: Re-enable workaround for trees
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/clojure-ts-mode 5f16fb8dbc: Re-enable workaround for treesit-transpose-sexps bug |
Date: |
Wed, 13 Sep 2023 00:59:19 -0400 (EDT) |
branch: elpa/clojure-ts-mode
commit 5f16fb8dbcaf9476cc6d5baab958b730cb60e854
Author: Danny Freeman <danny@dfreeman.email>
Commit: Danny Freeman <danny@dfreeman.email>
Re-enable workaround for treesit-transpose-sexps bug
See issue #17, specifically
https://github.com/clojure-emacs/clojure-ts-mode/issues/17#issuecomment-1705699794
---
CHANGELOG.md | 1 -
clojure-ts-mode.el | 11 ++++++++---
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 59fedbda22..33254bb63f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,7 +2,6 @@
## main (unreleased)
-- Re-enable treesit-transpose-sexps on Emacs 30 after fixes released by
@casouri.
- Pin grammar revision in treesit-language-source-alist
- Make font lock feature list more conforming with recommendations
- (See treesit-font-lock-level documentation for more information.)
diff --git a/clojure-ts-mode.el b/clojure-ts-mode.el
index 41d09be742..54a808eb44 100644
--- a/clojure-ts-mode.el
+++ b/clojure-ts-mode.el
@@ -790,8 +790,8 @@ forms like deftype, defrecord, reify, proxy, etc."
(defconst clojure-ts--thing-settings
`((clojure
- ((sexp ,(regexp-opt clojure-ts--sexp-nodes))
- (text ,(regexp-opt '("comment")))))))
+ (sexp ,(regexp-opt clojure-ts--sexp-nodes)
+ text ,(regexp-opt '("comment"))))))
(defvar clojure-ts-mode-map
(let ((map (make-sparse-keymap)))
@@ -883,7 +883,12 @@ See `clojure-ts--font-lock-settings' for usage of
MARKDOWN-AVAILABLE."
(when (eq clojure-ts--debug 'font-lock)
(setq-local treesit--font-lock-verbose t))
(treesit-inspect-mode))
- (treesit-major-mode-setup))))
+ (treesit-major-mode-setup)
+ ;; Workaround for treesit-transpose-sexps not correctly working with
+ ;; treesit-thing-settings on Emacs 30.
+ ;; Once treesit-transpose-sexps it working again this can be removed
+ (when (fboundp 'transpose-sexps-default-function)
+ (setq-local transpose-sexps-function
#'transpose-sexps-default-function)))))
;;;###autoload
(define-derived-mode clojurescript-ts-mode clojure-ts-mode "ClojureScript[TS]"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/clojure-ts-mode 5f16fb8dbc: Re-enable workaround for treesit-transpose-sexps bug,
ELPA Syncer <=