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: Jean Louis
Subject: Re: How to make M-x TAB not work on (interactive) declaration?
Date: Sun, 8 Jan 2023 02:40:04 +0300
User-agent: Mutt/2.2.9+54 (af2080d) (2022-11-21)

* Ruijie Yu <ruijie@netyu.xyz> [2023-01-08 00:28]:
> > (defun my-function ()
> >   (interactive nil '(text-mode))
> >   (message "Hello"))

Instead of above, I should do:

(defun my-function-1 ()
  (interactive nil 'text-mode 'fundamental-mode)
  (message "Hello"))

But I still see "my-function-1" when using TAB.

> Can confirm on both 29 and 28.  Although I think you missed the `&rest'
> in the argument list, so you would only need to say
> 
>     (interactive nil #'text-mode)
> 
> In my testing, I tried to define:
> 
>     (defun foo () (interactive nil #'text-mode) 2)
> 
> Running M-x fo TAB while inside an `ielm' buffer completes the `foo'
> command, which should not happen according to the quoted documentation.
> 
> On a slight tangent, I tried to use M-X (M-S-x,
> `execute-extended-command-for-buffer'), and regardless of what major
> modes I am in, I cannot find or call the `foo' command.

And I switched to text-mode and M-X does not show me the function.

This is inverse and awkward as to what is written in documentation.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



reply via email to

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