Fix tree-sitter indent preset prev-adaptive-prefix
authorYuan Fu <casouri@gmail.com>
Fri, 13 Sep 2024 07:23:13 +0000 (00:23 -0700)
committerYuan Fu <casouri@gmail.com>
Sat, 14 Sep 2024 07:28:22 +0000 (00:28 -0700)
* lisp/treesit.el (treesit-simple-indent-presets): Use looking-at so the
call to match-string has the match data to work with.

lisp/treesit.el

index 3ac8575aad4db3c55b7b35a75f4cb7b3859fe912..e0bcbe965c61b6a14a47c026d4df814b73dfe264 100644 (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)))))