From: Yuan Fu Date: Tue, 29 Oct 2024 02:30:52 +0000 (-0700) Subject: Fix the call to treesit-thing-defined-p X-Git-Tag: archive/raspbian/1%30.1+1-3+rpi1^2~2^2~20^2~303 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=df5ac0daf0fde7766ce607bd4c52a16650f3ac0f;p=emacs.git Fix the call to treesit-thing-defined-p * lisp/treesit.el (treesit-defun-at-point): Add the necessary 2nd argument. --- 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)))