From: Juri Linkov <juri@linkov.net>
To: Yuan Fu <casouri@gmail.com>
Cc: emacs-devel <emacs-devel@gnu.org>,
Mickey Petersen <mickey@masteringemacs.org>,
Theodor Thornhill <theo@thornhill.no>,
Dmitry Gutov <dgutov@yandex.ru>
Subject: Re: Extending define-derived-mode
Date: Tue, 30 May 2023 20:24:35 +0300 [thread overview]
Message-ID: <86a5xlbvj0.fsf@mail.linkov.net> (raw)
In-Reply-To: <20F07C52-6B39-4B24-8433-82E2226EADA6@gmail.com> (Yuan Fu's message of "Mon, 29 May 2023 22:16:49 -0700")
> I don’t have a clear vision right now, perhaps we want
> multiple inheritance for hooks, perhaps we can simply allow
> define-derived-mode to specify additional hooks to run, and create
> some language hooks that are shared by every mode serving that language.
> I’d like to hear your thoughts.
A well-known alternative to multiple inheritance would be to use mixins.
Implementation-wise this means extracting common parts to separate functions,
then calling e.g. 'js-base-setup' from both 'js-mode' and 'js-ts-mode'.
next prev parent reply other threads:[~2023-05-30 17:24 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-30 5:16 Extending define-derived-mode Yuan Fu
2023-05-30 5:51 ` Theodor Thornhill
2023-05-31 20:35 ` Yuan Fu
2023-06-01 5:43 ` Theodor Thornhill
2023-05-30 10:48 ` Eli Zaretskii
2023-05-30 14:16 ` Stefan Monnier
2023-05-31 21:31 ` Yuan Fu
2023-06-01 4:06 ` Stefan Monnier
2023-06-01 6:39 ` Eli Zaretskii
2023-06-02 7:50 ` Yuan Fu
2023-06-02 11:54 ` Eli Zaretskii
2023-06-05 7:31 ` Yuan Fu
2023-06-05 11:33 ` Eli Zaretskii
2023-06-08 7:25 ` Yuan Fu
2023-06-02 7:44 ` Yuan Fu
2023-06-02 16:46 ` Stefan Monnier
2023-06-05 7:39 ` Yuan Fu
2023-06-05 15:17 ` Stefan Monnier
2023-05-31 20:48 ` Yuan Fu
2023-06-01 5:47 ` Eli Zaretskii
2023-06-02 7:45 ` Yuan Fu
2023-06-02 11:51 ` Eli Zaretskii
2023-05-30 17:24 ` Juri Linkov [this message]
2023-06-05 8:30 ` Philip Kaludercic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86a5xlbvj0.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=casouri@gmail.com \
--cc=dgutov@yandex.ru \
--cc=emacs-devel@gnu.org \
--cc=mickey@masteringemacs.org \
--cc=theo@thornhill.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).