From e0dd8648b51a0cb601dba0a7c8931dd5f0269d6a Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Fri, 13 Sep 2024 00:23:13 -0700 Subject: [PATCH] Fix tree-sitter indent preset prev-adaptive-prefix * lisp/treesit.el (treesit-simple-indent-presets): Use looking-at so the call to match-string has the match data to work with. (cherry picked from commit c70bd0e3fe9c2f5b1fcdce7939c07449f8a5ec4c) --- lisp/treesit.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/treesit.el b/lisp/treesit.el index 2d52edb306a..a16f7deab60 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -1636,7 +1636,7 @@ See `treesit-simple-indent-presets'.") (goto-char bol) (setq this-line-has-prefix - (and (looking-at-p adaptive-fill-regexp) + (and (looking-at adaptive-fill-regexp) (not (string-match-p (rx bos (* whitespace) eos) (match-string 0))))) -- 2.39.5