projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
56468b5
)
; * lisp/treesit.el (treesit-node-top-level): cleaner and faster
author
Mattias Engdegård
<mattiase@acm.org>
Tue, 9 May 2023 11:28:20 +0000
(13:28 +0200)
committer
Mattias Engdegård
<mattiase@acm.org>
Tue, 9 May 2023 11:28:20 +0000
(13:28 +0200)
lisp/treesit.el
patch
|
blob
|
history
diff --git
a/lisp/treesit.el
b/lisp/treesit.el
index 54f223dc40bd5d94c4d482537df4bd7755a1787f..e9ca45c0d6c16c7b556f0d0b2093fb52c284944c 100644
(file)
--- a/
lisp/treesit.el
+++ b/
lisp/treesit.el
@@
-251,8
+251,7
@@
than using NODE's type. PRED can also be a predicate function,
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
- `(seq bos ,(treesit-node-type node) eos))))
+ (let ((pred (or pred (rx bos (literal (treesit-node-type node)) eos)))
(result nil))
(cl-loop for cursor = (if include-node node
(treesit-node-parent node))