* Re: [elpa] externals/setup 31dfc0f24e 2/5: Expand on how setting a "feature" sets hooks and maps.
[not found] ` <20220420125801.A7CAAC009A8@vcs2.savannah.gnu.org>
@ 2022-04-20 14:57 ` Stefan Monnier
2022-04-20 17:27 ` Philip Kaludercic
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2022-04-20 14:57 UTC (permalink / raw)
To: Philip Kaludercic; +Cc: Earl Hyatt, emacs-devel
Hi Philip,
> +- Declares a current mode by appending \"-mode\" to
> + FEATURE, unless it already ends with \"-mode\"
BTW, this also means that the current mode *has* to end in `-mode`.
In many/most cases it's better to ask the user to write the `-mode`.
Those 5 extra letters may seem like clutter, but they simplify the
"model", so I think it's to the benefit of the end user.
Otherwise you end up with possible confusions like "does `perl` refer
to the name of the language or to the name of the mode?" whose answer
influences how you specify the setup of `cperl-mode` for example.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [elpa] externals/setup 31dfc0f24e 2/5: Expand on how setting a "feature" sets hooks and maps.
2022-04-20 14:57 ` [elpa] externals/setup 31dfc0f24e 2/5: Expand on how setting a "feature" sets hooks and maps Stefan Monnier
@ 2022-04-20 17:27 ` Philip Kaludercic
2022-04-20 19:16 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Philip Kaludercic @ 2022-04-20 17:27 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Earl Hyatt, emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> Hi Philip,
>
>> +- Declares a current mode by appending \"-mode\" to
>> + FEATURE, unless it already ends with \"-mode\"
>
> BTW, this also means that the current mode *has* to end in `-mode`.
>
> In many/most cases it's better to ask the user to write the `-mode`.
> Those 5 extra letters may seem like clutter, but they simplify the
> "model", so I think it's to the benefit of the end user.
I had been thinking about this recently, and I do think that I made a
mistake in adding too many of these "dwim" features. This commit just
documents the behaviour, it doesn't add anything.
To solve the issue I would have to deprecate the current macro set and
provide a new one that could be used instead, written with the benefit
of hindsight.
> Otherwise you end up with possible confusions like "does `perl` refer
> to the name of the language or to the name of the mode?" whose answer
> influences how you specify the setup of `cperl-mode` for example.
>
>
> Stefan
--
Philip Kaludercic
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [elpa] externals/setup 31dfc0f24e 2/5: Expand on how setting a "feature" sets hooks and maps.
2022-04-20 17:27 ` Philip Kaludercic
@ 2022-04-20 19:16 ` Stefan Monnier
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2022-04-20 19:16 UTC (permalink / raw)
To: Philip Kaludercic; +Cc: Earl Hyatt, emacs-devel
> I had been thinking about this recently, and I do think that I made a
> mistake in adding too many of these "dwim" features. This commit just
> documents the behaviour, it doesn't add anything.
Yes, I realized that, it was just the commit that prompted the thought :-)
> To solve the issue I would have to deprecate the current macro set and
> provide a new one that could be used instead, written with the benefit
> of hindsight.
You could start by emitting warnings when the arg doesn't end in
`-mode` (if you decide it's a good change, that is. I haven't looked
at all the consequences it might have).
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-20 19:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <165045948052.4628.14498080121256237735@vcs2.savannah.gnu.org>
[not found] ` <20220420125801.A7CAAC009A8@vcs2.savannah.gnu.org>
2022-04-20 14:57 ` [elpa] externals/setup 31dfc0f24e 2/5: Expand on how setting a "feature" sets hooks and maps Stefan Monnier
2022-04-20 17:27 ` Philip Kaludercic
2022-04-20 19:16 ` Stefan Monnier
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).