emacs-devel
[Top][All Lists]
Advanced

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

Re: Make all tree-sitter modes optional


From: Stefan Monnier
Subject: Re: Make all tree-sitter modes optional
Date: Thu, 16 Feb 2023 09:41:20 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

>> Overriding the user's `auto-mode-alist` setting when merely loading
>> `c-ts-mode.el` is pretty drastic in my view, so the argument in favor of
>> this should be very strong and clear.
>
> The argument is simplicity for the users to try these modes and turn
> them on in their customizations.

But with my patch, trying the modes is exactly the same (just `M-x
c-ts-mode`) and turning them on in their customization is no harder
(since `(c-ts-activate)` is no harder to type than `(require
'c-ts-mode)`; we could also make it a global minor mode so it can be
done via Custom if it's considered important).

I spent a lot of time educating ELisp package maintainers about the need
to make sure that merely loading a file doesn't change Emacs's behavior,
and that `require` should basically never be needed in `.emacs` file.

There's *always* a good way to solve the problem without changing
Emacs's behavior just by loading a file (with the sole exception of the
`.emacs` file itself, for which changing Emacs's behavior is the sole
purpose).

>> E.g. just `C-h o c-ts-mode RET` or `C-h o c-ts TAB` is enough to load that 
>> file.
>
> That's an existing problem that should somehow be fixed, if we
> consider "C-h o" a popular command used by many users (I don't
> consider it that, and fail to see why someone would even think about
> doing that).

Replace `C-h o` with `C-h f` and the same holds.

[ I only ever use `C-h o` nowadays.  I too often used `C-h f` to look
  for a var or `C-h v` to look for a function.  :-) ]


        Stefan




reply via email to

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