From 68c40d5b661b44112663b883d4f48abb446370f9 Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Sun, 10 Dec 2023 17:40:39 -0800 Subject: [PATCH] Fix treesit-default-defun-skipper (bug#66711) * lisp/treesit.el: (treesit-default-defun-skipper): Add bol to the rx pattern. (cherry picked from commit d2c4b926ac20de6f7d9f3576b22272bc560bd0f7) --- lisp/treesit.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/treesit.el b/lisp/treesit.el index e146e40020b..c6b9d8ff4bc 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -2359,7 +2359,7 @@ the current line if the beginning of the defun is indented." (forward-line 1)) ;; Moving backward, but there are some whitespace (and only ;; whitespace) between point and BOL: go back to BOL. - ((looking-back (rx (+ (or " " "\t"))) + ((looking-back (rx bol (+ (or " " "\t"))) (line-beginning-position)) (beginning-of-line)))) -- 2.39.5