emacs-devel
[Top][All Lists]
Advanced

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

Re: Limit what M-x TAB lists?


From: Lars Ingebrigtsen
Subject: Re: Limit what M-x TAB lists?
Date: Thu, 26 Dec 2013 16:24:23 +0100
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> 2) New form like (command-interactive 'vc-mode "p")
>
> More generally, move the "sanity checks" performed at the beginning of
> some commands to a special place so they can be run without actually
> calling the function.  IOW add a "callable" predicate alongside the
> interactive-spec that M-x could then use to filter out
> inapplicable commands.

Hm, yes, that would be nice.  Then multi-mode commands like
`quit-window' could have a complex predicate that does the right thing,
while very mode-specific commands like `gnus-summary-catchup-to-here'
could have a simple (mode-only) predicate.

If these predicates become very complex, then `M-x fooTAB' would become
exceedingly slow, though...

> Of course, this will require many changes in many packages before it
> becomes really useful.

Yes, but modes could be converted gradually, and things would get better
and better as time passes...

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



reply via email to

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