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

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

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


From: Jean Louis
Subject: How to make M-x TAB not work on (interactive) declaration?
Date: Sat, 07 Jan 2023 23:53:48 +0300

Reference:
(describe-function 'interactive)

If MODES is present, it should be a list of mode names (symbols) that
this command is applicable for.  The main effect of this is that
‘M-x TAB’ (by default) won’t list this command if the current buffer’s
mode doesn’t match the list.  That is, if either the major mode isn’t
derived from them, or (when it’s a minor mode) the mode isn’t in effect.

For this example here I can still see it in M-x TAB expansion in any
mode.

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


And I expect not to see it.

What am I doing wrong?


--
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]