From: Yuan Fu Date: Tue, 29 Oct 2024 02:30:52 +0000 (-0700) Subject: Fix the call to treesit-thing-defined-p X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1401b47468a092604d6fd8b398adb894ca0e68db;p=emacs.git 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) --- 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)))