emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master cebd26b2e16: Use treesit-node-match-p in treesit-parent-while


From: Yuan Fu
Subject: master cebd26b2e16: Use treesit-node-match-p in treesit-parent-while
Date: Tue, 6 Feb 2024 02:16:16 -0500 (EST)

branch: master
commit cebd26b2e16d75a939e2a9f91becc6ec702122a7
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>

    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.
---
 lisp/treesit.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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.
 PRED can be a predicate function, a regexp matching node type,
 and more; see docstring of `treesit-thing-settings'."
   (let ((last nil))
-    (while (and node (funcall pred node))
+    (while (and node (treesit-node-match-p node pred))
       (setq last node
             node (treesit-node-parent node)))
     last))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]