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: Eli Zaretskii
Subject: Re: Plug treesit.el into other emacs constructs
Date: Mon, 12 Dec 2022 16:45:33 +0200

> From: Theodor Thornhill <theo@thornhill.no>
> Cc: eliz@gnu.org, casouri@gmail.com
> Date: Mon, 12 Dec 2022 15:33:33 +0100
> 
> The patch only adds a few things:
> 
> - (defvar-local forward-sentence-function nil), the analog to
>   forward-sexp-function and beginning-of-defun-function
> - treesit-sexp-type-regexp and treesit-sentence-type-regexp, both to be
>   added to treesit-major-mode-setup, and added to each *-ts-mode.
> 
> Is the general idea ok?

Yes, because you can see that CC Mode supports these key bindings as
well, with its own commands.

> Could we add these or similar changes to
> paragraphs.el and just piggyback on it inside of treesit?

I'm not sure we want to go this far in the release branch, but it
would be nice to have these in C mode, for example (or any other
tree-sitter supported mode whose "regular" sibling has similar
commands).  The generalizations should IMO be left for master.

> If we want this I can start working on preparing a patch for this on the
> master branch.

I think so, but let's hear from others, like Stefan (CC'ed).



reply via email to

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