[Top][All Lists]

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

Re: Leaving out non-applicable commands on Mx

From: Stefan Monnier
Subject: Re: Leaving out non-applicable commands on Mx
Date: Sun, 10 Jan 2016 11:05:22 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

> That would certainly help with discoverability of the global
> commands, but would it also allow completing over the commands that are
> applicable to the current mode(s)?

I don't see why not.  Basically

   (new-magic-declare "foo-" <decls>)

would be equivalent to adding

   (declare (mode-specific <decls>))

to all commands whose name start with "foo-" and which don't yet have
a (mode-specific ...) declaration.

> For instance, there are often commands that apply to similar modes
> (for instance in the cc-mode family) that aren't necessarily named
> what you might think, I think...

Of course you can have several calls to (new-magic-declare "foo-"
<decls>) for different prefixes, and of course you don't have to use it
(e.g. if there are more exceptions than cases which follow the rule).


reply via email to

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