From: Yuan Fu Date: Fri, 13 Sep 2024 07:23:13 +0000 (-0700) Subject: Fix tree-sitter indent preset prev-adaptive-prefix X-Git-Tag: archive/raspbian/1%30.1+1-3+rpi1^2~2^2~20^2~421 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c70bd0e3fe9c2f5b1fcdce7939c07449f8a5ec4c;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. --- diff --git a/lisp/treesit.el b/lisp/treesit.el index 3ac8575aad4..e0bcbe965c6 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -1647,7 +1647,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)))))