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.
This commit is contained in:
Yuan Fu 2024-09-13 00:23:13 -07:00
parent 272df33fb8
commit c70bd0e3fe
No known key found for this signature in database
GPG key ID: 56E19BC57664A442

View file

@ -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)))))