emacs-devel
[Top][All Lists]
Advanced

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

Re: Smarter M-x that filters on major-mode


From: Stefan Monnier
Subject: Re: Smarter M-x that filters on major-mode
Date: Sun, 14 Feb 2021 21:49:03 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> Since approx. 97% of commands will eventually have this markup, that
> means that 97% of commands will start with
>
>   (declare (modes foo-mode))
>   (interactive "p")
>
> and that seems like too much line noise.

FWIW, I think that having 97% of commands start with

    (interactive "p" foo-mode)

is also undesirable.  I'd much rather have those 97% start with

    (interactive)

and the remaining 3% can use the more verbose:

    (declare (completion t))
    (interactive)

That should also make it easier to share the exact same objects to
represent the predicates for those 97% instead of having each one be
a silly identical clones of the other.  IOW it'd be more efficient for
the coder, for the source code, and at run-time.


        Stefan




reply via email to

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