emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Plug treesit.el into other emacs constructs


From: Stefan Monnier
Subject: Re: Plug treesit.el into other emacs constructs
Date: Tue, 27 Dec 2022 19:12:10 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

> I think I managed to keep the semantics as they are now.  What do you
> think?  Does this seem like a sane approach?

Yes, LGTM.  See nitpicks below.

> +** New function 'treesit-trnspose-sexps'
                             ^^
                             a

> +(defvar-local transpose-sexps-function

I'd keep it a plain `defvar`.

> +  "If non-nil, `transpose-sexps' delegates to this function.
> +
> +This function takes one argument ARG, a number as provided
> +through running `transpose-sexps'.  Its expected return value is
> +a position pair, which is a cons (BEG . END), where BEG and END
> +are buffer positions.")

The ARG is not quite the same as the one passed to `transpose-sexps`.
I think we should say something like ".. ARG, a number.  Its expected
return value is a pair of positions (BEG . END) delimiting the ARGth
sibling".

The rest looks great, thanks.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]