bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes


From: Eli Zaretskii
Subject: bug#68246: 30.0.50; Add non-TS mode as extra parent of TS modes
Date: Sun, 07 Jan 2024 08:55:34 +0200

> From: João Távora <joaotavora@gmail.com>
> Date: Sat, 6 Jan 2024 22:22:49 +0000
> Cc: Eli Zaretskii <eliz@gnu.org>, casouri@gmail.com, 68246@debbugs.gnu.org
> 
> On Sat, Jan 6, 2024 at 3:50 PM Stefan Monnier <monnier@iro.umontreal.ca> 
> wrote:
> For simplifying the existing ways these 3 packages already
> solve the problem, I propose that instead of calling 
> 'derived-mode-add-parents'
> directly near the mode definitions, we instead do something like:
> 
>    (set-language-for-mode 'foo-ts-mode 'foo)

This assumes that the only important aspect of a major mode that
transcends the "normal" ancestry is the language that the mode
supports.  But that is not necessarily true in all cases.  Also, some
major modes don't have a "language" attribute, in the usual sense of
that word.

IOW, this is IMO an even more leaky abstraction than what we get with
derived-mode-add-parents.





reply via email to

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