From: Yuan Fu Date: Fri, 13 Sep 2024 07:23:13 +0000 (-0700) Subject: Fix tree-sitter indent preset prev-adaptive-prefix X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e0dd8648b51a0cb601dba0a7c8931dd5f0269d6a;p=emacs.git 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) --- 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)))))