* lisp/treesit.el (treesit-simple-indent-presets):
adaptive-fill-regexp don't have a capture group (the group in the
default value is supposed to be a non-capture group), so don't use the
group. Also, in the second diff hunk, replace looking-at with
looking-at-p so it doesn't override match data that we use later.
(goto-char bol)
(setq this-line-has-prefix
- (and (looking-at adaptive-fill-regexp)
- (match-string 1)))
+ (and (looking-at-p adaptive-fill-regexp)
+ (not (string-match-p
+ (rx bos (* whitespace) eos)
+ (match-string 0)))))
(forward-line -1)
(and (>= (point) comment-start-bol)
(looking-at adaptive-fill-regexp)
;; If previous line is an empty line, don't
;; indent.
- (not (looking-at (rx (* whitespace) eol)))
+ (not (looking-at-p (rx (* whitespace) eol)))
;; Return the anchor. If the indenting line
;; has a prefix and the previous line also
;; has a prefix, indent to the beginning of