]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix tree-sitter indent preset prev-adaptive-prefix
authorYuan Fu <casouri@gmail.com>
Fri, 13 Sep 2024 07:23:13 +0000 (00:23 -0700)
committerEshel Yaron <me@eshelyaron.com>
Sat, 14 Sep 2024 20:32:05 +0000 (22:32 +0200)
* lisp/treesit.el (treesit-simple-indent-presets): Use looking-at so the
call to match-string has the match data to work with.

(cherry picked from commit c70bd0e3fe9c2f5b1fcdce7939c07449f8a5ec4c)

lisp/treesit.el

index 2d52edb306a42b2bbd062530ea0f219132b733e0..a16f7deab60dcda17c154570a5021469b119c9cb 100644 (file)
@@ -1636,7 +1636,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)))))