From: Eli Zaretskii <eliz@gnu.org>
To: Yuan Fu <casouri@gmail.com>
Cc: 60983@debbugs.gnu.org, theo@thornhill.no
Subject: bug#60983: 29.0.60; Tree-sitter user-level control
Date: Fri, 03 Feb 2023 09:47:34 +0200 [thread overview]
Message-ID: <83tu03ur55.fsf@gnu.org> (raw)
In-Reply-To: <7B62BDA1-C46B-4373-B3A7-2F9E34F3D803@gmail.com> (message from Yuan Fu on Thu, 2 Feb 2023 19:07:07 -0800)
> From: Yuan Fu <casouri@gmail.com>
> Date: Thu, 2 Feb 2023 19:07:07 -0800
> Cc: Bug Report Emacs <bug-gnu-emacs@gnu.org>,
> Theodor Thornhill <theo@thornhill.no>
>
> I just read the new manual sections, thanks for the work! Do we want to mention treesit-font-lock-recompute-features in the user manual? That’s the only way for someone to add/remove specific features (as opposed to changing the decoration level). (We might also want to mention that changing treesit-font-lock-features directly doesn’t have any effect, similar to treesit-font-lock-level.)
treesit-font-lock-recompute-features is a non-interactive function, so
mentioning it in the user manual is generally inappropriate. Users
are unlikely to add features that aren't already defined in the mode's
font-lock setup.
This function and its use in these situations are described in the
ELisp manual, where I think it belongs.
As for the fact that changing treesit-font-lock-feature-list directly
doesn't have any effect, that is already in the doc string. I'm not
opposed to mentioning that in the manual as well, but I see no problem
with what we have.
> treesit-font-lock-recompute-features is intended to be used in major mode hooks, like
>
> (add-hook 'c-ts-mode-hook #'c-ts-setup)
>
> (defun c-ts-mode-setup ()
> (treesit-font-lock-recompute-features
> '(emacs-devel)
> '(property bracket delimiter operator variable function)))
This belongs to the ELisp manual, IMO.
next prev parent reply other threads:[~2023-02-03 7:47 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-21 11:11 bug#60983: 29.0.60; Tree-sitter user-level control Eli Zaretskii
2023-01-21 11:48 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-21 12:36 ` Eli Zaretskii
2023-01-21 12:40 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-23 19:37 ` Yuan Fu
2023-01-23 19:59 ` Eli Zaretskii
2023-01-23 21:08 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-23 23:55 ` Yuan Fu
2023-01-29 13:33 ` Eli Zaretskii
2023-01-29 19:12 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-29 19:41 ` Eli Zaretskii
2023-01-30 2:28 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-30 13:45 ` Eli Zaretskii
2023-01-24 3:26 ` Eli Zaretskii
2023-01-25 20:12 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-25 21:16 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-26 8:27 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-26 6:08 ` Eli Zaretskii
2023-01-26 6:25 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-23 16:52 ` Eli Zaretskii
2023-01-26 7:27 ` Eli Zaretskii
2023-01-26 7:37 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-26 9:08 ` Eli Zaretskii
2023-01-28 13:12 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-28 13:25 ` Eli Zaretskii
2023-01-28 18:41 ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-29 13:24 ` Eli Zaretskii
2023-01-26 7:56 ` Yuan Fu
2023-02-03 3:07 ` Yuan Fu
2023-02-03 7:47 ` Eli Zaretskii [this message]
2023-02-04 23:38 ` Yuan Fu
2023-02-05 6:01 ` Eli Zaretskii
2023-02-05 7:54 ` Yuan Fu
2023-02-05 9:23 ` Eli Zaretskii
2023-02-05 9:42 ` Yuan Fu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83tu03ur55.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=60983@debbugs.gnu.org \
--cc=casouri@gmail.com \
--cc=theo@thornhill.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).