branch: elpa/clojure-ts-mode commit fd7e5dab9efe08c0e2bdf7ca6ada2a063915f2ec Author: Daanturo <daant...@gmail.com> Commit: Bozhidar Batsov <bozhi...@batsov.dev>
Let clojure-ts-mode derive from clojure-mode for Emacs 30+ Emacs 30 defines the function `derived-mode-add-parents` that is used for the built-in *-ts-mode, this will make (provided-mode-derived-p 'clojure-ts-mode 'clojure-mode) return true just like other treesit major modes. --- CHANGELOG.md | 1 + clojure-ts-mode.el | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65aa179e43..c669d0e8d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - [#38]: Add support for `in-ns` forms in `clojure-ts-find-ns`. - [#46]: Fix missing `comment-add` variable in `clojure-ts-mode-variables` mentioned in [#26] - Add imenu support for `deftest` definitions. +- [#53]: Let `clojure-ts-mode` derive from `clojure-mode` for Emacs 30+. ## 0.2.2 (2024-02-16) diff --git a/clojure-ts-mode.el b/clojure-ts-mode.el index 60fbcb7f4a..4fe25e907e 100644 --- a/clojure-ts-mode.el +++ b/clojure-ts-mode.el @@ -966,6 +966,11 @@ See `clojure-ts--font-lock-settings' for usage of MARKDOWN-AVAILABLE." (when (fboundp 'transpose-sexps-default-function) (setq-local transpose-sexps-function #'transpose-sexps-default-function))))) +;; For Emacs 30+, so that `clojure-ts-mode' is treated as deriving from +;; `clojure-mode' +(when (fboundp #'derived-mode-add-parents) + (derived-mode-add-parents 'clojure-ts-mode '(clojure-mode))) + ;;;###autoload (define-derived-mode clojure-ts-clojurescript-mode clojure-ts-mode "ClojureScript[TS]" "Major mode for editing ClojureScript code.