help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How to make M-x TAB not work on (interactive) declaration?


From: Eli Zaretskii
Subject: Re: How to make M-x TAB not work on (interactive) declaration?
Date: Sun, 08 Jan 2023 12:38:07 +0200

> Date: Sun, 8 Jan 2023 09:21:32 +0300
> From: Jean Louis <bugs@gnu.support>
> Cc: help-gnu-emacs@gnu.org
> 
> * Eli Zaretskii <eliz@gnu.org> [2023-01-08 09:07]:
> > > And I expect not to see it.
> > > 
> > > What am I doing wrong?
> > 
> > The doc string is wrong: the default is to show all commands.  If you
> > want to see only those relevant to MODES, either use M-X (upper-case
> > X) or customize read-extended-command-predicate's value to be the
> > function command-completion-default-include-p.
> 
> Now we know that there is some inconsistency, thanks for confirming
> it.
> 
> For this function:
> 
> (defun my-function ()
>   (interactive nil '(text-mode mail-mode))
>   (message "Hello"))
> 
> major-mode ➜ mail-mode
> 
> My default was:
> (setq read-extended-command-predicate nil)
> 
> - I can see 90 possible completions with M-X in mail-mode, WITHOUT 
> `my-function'
> 
> - I can see 9819 possible completions with M-x in mail-mode, WITH 
> `my-function'
> 
> when I turn it on:
> 
> (setq read-extended-command-predicate 'command-completion-default-include-p)
> 
> - I can see 90 possible completions with M-X in mail-mode, WITHOUT 
> `my-function'
> 
> - I can see 8777 possible completions with M-x in mail-mode, WITHOUT 
> `my-function'
> 
> Which means that my function cannot be found with recommended
> settings in mail-mode, so there must be more inconsistencies.
> 
> I have filed the above as bug, it is best to continue discussion as
> bug.
> 
> But in the bug there shall be wording "I can see 8777" just as in
> here, there was mistake.

You reported a bug, so let's continue discussing this there.

In general, I believe your expectations were wrong.



reply via email to

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