From 1401b47468a092604d6fd8b398adb894ca0e68db 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. (cherry picked from commit 1551c306f30cc139b321056c03206df4b71eae5c) --- lisp/treesit.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/treesit.el b/lisp/treesit.el index 91efdb30f31..55b6349139d 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -2826,7 +2826,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.39.2