aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuan Fu2024-09-13 00:23:13 -0700
committerYuan Fu2024-09-14 00:28:22 -0700
commitc70bd0e3fe9c2f5b1fcdce7939c07449f8a5ec4c (patch)
tree4a53235407892acc17d1b3ae3522c70e12d50cb0
parent272df33fb8bde41887bfa4b03ed8223b9c03c572 (diff)
downloademacs-c70bd0e3fe9c2f5b1fcdce7939c07449f8a5ec4c.tar.gz
emacs-c70bd0e3fe9c2f5b1fcdce7939c07449f8a5ec4c.zip
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.
-rw-r--r--lisp/treesit.el2
1 files changed, 1 insertions, 1 deletions
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'.")
1647 1647
1648 (goto-char bol) 1648 (goto-char bol)
1649 (setq this-line-has-prefix 1649 (setq this-line-has-prefix
1650 (and (looking-at-p adaptive-fill-regexp) 1650 (and (looking-at adaptive-fill-regexp)
1651 (not (string-match-p 1651 (not (string-match-p
1652 (rx bos (* whitespace) eos) 1652 (rx bos (* whitespace) eos)
1653 (match-string 0))))) 1653 (match-string 0)))))