* doc/lispref/modes.texi (Parser-based Indentation): Update manual.
* lisp/treesit.el (treesit-simple-indent-presets): Add preset. Update
docstring.
This anchor is a function that is called with 3 arguments: @var{node},
@var{parent}, and @var{bol}, and returns the first non-whitespace
charater on the previous line.
+
+@item point-min
+This anchor is a function is called with 3 arguments: @var{node},
+@var{parent}, and @var{bol}, and returns the beginning of the buffer.
+This is useful as the beginning of the buffer is always at column 0.
@end ftable
@end defvar
(goto-char bol)
(forward-line -1)
(skip-chars-forward " \t"))))
+ (cons 'point-min (lambda (&rest _) (point-min)))
;; TODO: Document.
(cons 'and (lambda (&rest fns)
(lambda (node parent bol &rest _)
prev-line
- The first non-whitespace charater on the previous line.")
+ The first non-whitespace charater on the previous line.
+
+point-min
+
+ Returns the beginning of buffer, which is always at column 0.")
(defun treesit--simple-indent-eval (exp)
"Evaluate EXP.