From df5ac0daf0fde7766ce607bd4c52a16650f3ac0f Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Mon, 28 Oct 2024 19:30:52 -0700 Subject: [PATCH] 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))) -- 2.30.2