emacs-diffs
[Top][All Lists]
Advanced

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

emacs-30 df5ac0daf0f 1/3: Fix the call to treesit-thing-defined-p


From: Yuan Fu
Subject: emacs-30 df5ac0daf0f 1/3: Fix the call to treesit-thing-defined-p
Date: Thu, 31 Oct 2024 01:36:48 -0400 (EDT)

branch: emacs-30
commit df5ac0daf0fde7766ce607bd4c52a16650f3ac0f
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>

    Fix the call to treesit-thing-defined-p
    
    * lisp/treesit.el (treesit-defun-at-point): Add the necessary
    2nd argument.
---
 lisp/treesit.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/treesit.el b/lisp/treesit.el
index 9ac470691d6..2518204ce93 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -2823,7 +2823,9 @@ is `nested'.
 
 Return nil if `treesit-defun-type-regexp' isn't set and `defun'
 isn't defined in `treesit-thing-settings'."
-  (when (or treesit-defun-type-regexp (treesit-thing-defined-p 'defun))
+  (when (or treesit-defun-type-regexp
+            (treesit-thing-defined-p
+             'defun (treesit-language-at (point))))
     (treesit-thing-at-point
      (or treesit-defun-type-regexp 'defun) treesit-defun-tactic)))
 



reply via email to

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