emacs-devel
[Top][All Lists]
Advanced

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

Re: On treesit preference for "consumer" modes


From: Eli Zaretskii
Subject: Re: On treesit preference for "consumer" modes
Date: Sat, 26 Aug 2023 20:14:07 +0300

> Date: Sat, 26 Aug 2023 20:04:10 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@gnu.org
> 
> > From: JD Smith <jdtsmith@gmail.com>
> > Date: Sat, 26 Aug 2023 12:47:18 -0400
> > 
> > In the new era of LANG-mode and LANG-ts-mode duality, how should the 
> > consumer mode decide which one to use?
> 
> A user option, I think.  There's no other reliable way ATM.

You could also use telltale signs, if they exist:

  . if a ts mode is already loaded (featurep test)
  . if auto-mode-alist defines a ts mode for the relevant files

But these cannot be relied upon 100%, because the user might prefer a
ts mode, but has not yet loaded it or used it in this session.  So a
fallback is needed, and that can only be a user option, I think.



reply via email to

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