emacs-devel
[Top][All Lists]
Advanced

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

Re: Average-user-facing interface for tree-sitter


From: Stefan Monnier
Subject: Re: Average-user-facing interface for tree-sitter
Date: Fri, 14 Oct 2022 16:49:14 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> I wonder if we can have a major mode hook that runs before the body runs,
> like xxx-mode-before-hook.

Given the way things are currently setup, it's not really feasible in
a clean and reliable way, no.

What we have instead is:
- the `:after-hook`, i.e. part of the major-mode's
  code that is run after the major-mode hook.
- The `hack-local-variables-hook` which the major-mode can set
  buffer-locally.  It's similar to the `after-hook:`, except it's run
  after setting the file-local variables, so it's more often what
  we want.


        Stefan





reply via email to

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