[Top][All Lists]

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

Re: New ELPA package ada-lite

From: Stephen Leake
Subject: Re: New ELPA package ada-lite
Date: Wed, 17 Aug 2022 18:23:11 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (windows-nt)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> Sounds good, as long as the other ada-mode will be modified to (require
>>> and) derive from (or extend) ada-lite.
>>> Currently, if both ada-mode and ada-lite packages are installed and
>>> activated, their autoloads will fight for the top spot of
>>> `auto-mode-alist`.
>> Hmm. I was assuming only one would be activated. In my current testing,
>> I have ada-mode disabled in package-load-list, so I have not run into
>> this problem.
>> I don't see how deriving ada-mode from ada-lite-mode helps here; there
>> are still conflicting entries in auto-mode-alist.
> It doesn't for the `auto-mode-alist` issue.
> Maybe the full ada-mode should be turned into a minor mode for
> `ada-lite-mode` (like eglot-mode)?

Hmm. Maybe. Currently they are distinct modes because eglot uses the
mode to find the language server; ada-lite-mode allows for eglot, but
ada-mode provides many of the same facilities as eglot, and therefore
eglot should _not_ know about it.

The current entry in eglot-server-programs has ada-mode; that will
change to ada-lite-mode when this gets released. Unless we decide on a
different solution.

> There's a bunch of similar cases:
> - Built-in tex-mode va AUCTeX
> - cperl-mode vs perl-mode
> - js-mode vs js2-mode vs js3-mode vs jsx-mode vs ...
> - python.el vs python-mode.el
> This is generally considered as a problem, so the better choice is to
> try and avoid it.

I guess the long-term goal is to merge all features into one mode,
possibly as minor-modes, as you describe for javascript.

If each feature of ada-mode that conflicts with eglot is changed to a
minor mode, it can just be disabled, rather than deleted.

I'll experiment; I'll use ada-mode with eglot, and try to turn off
things that cause problems.

>> You seem to be implying that syntax-ppss-flush-cache is already done by
>> the "set major mode" code?
> Yes, that should be the case (because the cache's info is kept in local
> vars which get zapped by the `kill-all-local-variables`).

Ok, I'll delete the flush-cache and see what happens.

-- Stephe

reply via email to

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