GNU bug report logs -
#77077
Markers in treesit_check_node
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Mon, 17 Mar 2025 18:01:02 UTC
Severity: normal
Fixed in version 31.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 77077 <at> debbugs.gnu.org (full text, mbox):
>> Anyway, I think we should keep treesit_check_position as-is. And
>> change treesit-indent-region to convert markers to integers. Integer
>> and marker might be interchangeable in Lisp, but I don’t think it’s
>> a good idea to mingle them in C.
>
> OK, then let's fix only treesit-indent-region:
>
> diff --git a/lisp/treesit.el b/lisp/treesit.el
> index 46332cb1e4b..7410c0f32a8 100644
> --- a/lisp/treesit.el
> +++ b/lisp/treesit.el
> @@ -2602,6 +2602,8 @@ treesit--indent-region-batch-size
> (defun treesit-indent-region (beg end)
> "Indent the region between BEG and END.
> Similar to `treesit-indent', but indent a region instead."
> + (when (markerp beg) (setq beg (marker-position beg)))
> + (when (markerp end) (setq end (marker-position end)))
> (treesit-update-ranges beg end)
> ;; We indent `treesit--indent-region-batch-size' lines at a time, to
> ;; reduce the number of times the parser needs to re-parse. In each
Eli, is it ok to install this patch in emacs-30?
This bug report was last modified 58 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.