GNU bug report logs -
#68246
30.0.50; Add non-TS mode as extra parent of TS modes
Previous Next
Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>
Date: Thu, 4 Jan 2024 22:12:01 UTC
Severity: wishlist
Found in version 30.0.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: João Távora <joaotavora <at> gmail.com>
> Date: Mon, 8 Jan 2024 00:12:50 +0000
> Cc: monnier <at> iro.umontreal.ca, casouri <at> gmail.com, 68246 <at> debbugs.gnu.org
>
> On Sun, Jan 7, 2024 at 6:55 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > But that is not necessarily true in all cases.
>
> I specifically said I was speaking for 2 packages I created,
> Eglot and Yasnippet, and possibly for lsp-mode how is facing the same
> problem, which is answering the question:
>
> what, if any, is the language/file type for a given major mode?
>
> I can't speak to those other cases unless someone bring them forth.
A generalization should be based on as many use cases as possible.
> > Also, some major modes don't have a "language" attribute, in
> > the usual sense of that word.
>
> Then I guess "nil" would be a fine default for anything not inheriting from
> "prog-mode"?
That's not useful, since, for example, TS and non-TS mods for those
"no-language" modes will still want to be treated the same in some
situations, like .dir-locals.el.
> > IOW, this is IMO an even more leaky abstraction than what we get with
> > derived-mode-add-parents.
>
> We don't seem to share the same concept of what a "leaky abstraction" is.
> In my world, it's an abstraction that exposes details of the thing
> it's supposed to abstract away.
That's the sense in which I'm using it.
> Unless we're trying to abstract away lisp symbols, I don't see how
> set/get-language-for-mode is leaky.
It attempts to abstract a trait that isn't abstract, by going in the
opposite direction of that used for abstractions.
> But if Stefan's patch is supposed to also abstract away the
> language-mode correspondence
It isn't, AFAIU.
This bug report was last modified 1 year and 104 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.