diff options
| author | Yuan Fu | 2024-02-05 23:12:36 -0800 |
|---|---|---|
| committer | Yuan Fu | 2024-02-05 23:15:26 -0800 |
| commit | cebd26b2e16d75a939e2a9f91becc6ec702122a7 (patch) | |
| tree | e389e09d845f865fc3ef582f57bde83430b7eda9 | |
| parent | 10faaa3c91045390755791c21349cd562546fdea (diff) | |
| download | emacs-cebd26b2e16d75a939e2a9f91becc6ec702122a7.tar.gz emacs-cebd26b2e16d75a939e2a9f91becc6ec702122a7.zip | |
Use treesit-node-match-p in treesit-parent-while
The previous commit should've done this, but I missed it.
* lisp/treesit.el (treesit-parent-while): Use treesit-node-match-p.
| -rw-r--r-- | lisp/treesit.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/treesit.el b/lisp/treesit.el index f179204d89c..6a485ae591a 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el | |||
| @@ -366,7 +366,7 @@ returns nil. | |||
| 366 | PRED can be a predicate function, a regexp matching node type, | 366 | PRED can be a predicate function, a regexp matching node type, |
| 367 | and more; see docstring of `treesit-thing-settings'." | 367 | and more; see docstring of `treesit-thing-settings'." |
| 368 | (let ((last nil)) | 368 | (let ((last nil)) |
| 369 | (while (and node (funcall pred node)) | 369 | (while (and node (treesit-node-match-p node pred)) |
| 370 | (setq last node | 370 | (setq last node |
| 371 | node (treesit-node-parent node))) | 371 | node (treesit-node-parent node))) |
| 372 | last)) | 372 | last)) |