]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix treesit-node-top-level (bug#63374)
authorYuan Fu <casouri@gmail.com>
Mon, 8 May 2023 19:58:19 +0000 (12:58 -0700)
committerYuan Fu <casouri@gmail.com>
Mon, 8 May 2023 19:59:54 +0000 (12:59 -0700)
* lisp/treesit.el (treesit-node-top-level): Fix the use of
rx-to-string.

lisp/treesit.el

index 1b1a7783a32e4e6ec51003768eaca0d792bdd3f2..54f223dc40bd5d94c4d482537df4bd7755a1787f 100644 (file)
@@ -252,7 +252,7 @@ and more.  See `treesit-thing-settings' for details.
 
 If INCLUDE-NODE is non-nil, return NODE if it satisfies PRED."
   (let ((pred (or pred (rx-to-string
-                        `(bos ,(treesit-node-type node) eos))))
+                        `(seq bos ,(treesit-node-type node) eos))))
         (result nil))
     (cl-loop for cursor = (if include-node node
                             (treesit-node-parent node))