unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master 6a2cdc6: Allow minor modes to specify major modes they're useful in
       [not found] ` <20210212132015.D684620999@vcs0.savannah.gnu.org>
@ 2021-02-12 13:52   ` Stefan Monnier
  2021-02-13 12:03     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2021-02-12 13:52 UTC (permalink / raw)
  To: emacs-devel; +Cc: Lars Ingebrigtsen

> +@item :interactive @var{value}
> +Minor modes are interactive commands by default.  If @var{value} is
> +@code{nil}, this is inhibited.  If @var{value} is a list of symbols,
> +it's used to say which major modes this minor mode is useful in.
>  @end table

Please always arrange for keyword arguments to mean the same when `nil`
is specified as when the keyword is absent.


        Stefan




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: master 6a2cdc6: Allow minor modes to specify major modes they're useful in
  2021-02-12 13:52   ` master 6a2cdc6: Allow minor modes to specify major modes they're useful in Stefan Monnier
@ 2021-02-13 12:03     ` Lars Ingebrigtsen
  2021-02-13 13:53       ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-02-13 12:03 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

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

>> +@item :interactive @var{value}
>> +Minor modes are interactive commands by default.  If @var{value} is
>> +@code{nil}, this is inhibited.  If @var{value} is a list of symbols,
>> +it's used to say which major modes this minor mode is useful in.
>>  @end table
>
> Please always arrange for keyword arguments to mean the same when `nil`
> is specified as when the keyword is absent.

That would certainly be nice, but I didn't see how to make that work
here -- :noninteractive would be misleading, since :interactive
(foo-mode) makes it interactive.

So :interactive t and leaving the keyword out results in identical
results, and I don't think that's too bad.  If you squint at it, it's a
bit Common Lispish.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: master 6a2cdc6: Allow minor modes to specify major modes they're useful in
  2021-02-13 12:03     ` Lars Ingebrigtsen
@ 2021-02-13 13:53       ` Stefan Monnier
  2021-02-13 15:10         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2021-02-13 13:53 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

> That would certainly be nice, but I didn't see how to make that work
> here -- :noninteractive would be misleading, since :interactive
> (foo-mode) makes it interactive.

How 'bout `:inhibit-interactive` or `:not-a-command`?

> So :interactive t and leaving the keyword out results in identical
> results, and I don't think that's too bad.  If you squint at it, it's a
> bit Common Lispish.

That's a part of Common-Lisp that I don't like.


        Stefan




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: master 6a2cdc6: Allow minor modes to specify major modes they're useful in
  2021-02-13 13:53       ` Stefan Monnier
@ 2021-02-13 15:10         ` Lars Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-02-13 15:10 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

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

>> That would certainly be nice, but I didn't see how to make that work
>> here -- :noninteractive would be misleading, since :interactive
>> (foo-mode) makes it interactive.
>
> How 'bout `:inhibit-interactive` or `:not-a-command`?

And add another keyword for :applicable-modes?  That seems even more
complicated...

>> So :interactive t and leaving the keyword out results in identical
>> results, and I don't think that's too bad.  If you squint at it, it's a
>> bit Common Lispish.
>
> That's a part of Common-Lisp that I don't like.

I love that bit -- it allows us to never use parameters like not-foo,
which are fraught with misunderstanding.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-02-13 15:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210212132014.3598.4437@vcs0.savannah.gnu.org>
     [not found] ` <20210212132015.D684620999@vcs0.savannah.gnu.org>
2021-02-12 13:52   ` master 6a2cdc6: Allow minor modes to specify major modes they're useful in Stefan Monnier
2021-02-13 12:03     ` Lars Ingebrigtsen
2021-02-13 13:53       ` Stefan Monnier
2021-02-13 15:10         ` Lars Ingebrigtsen

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).