emacs-devel
[Top][All Lists]
Advanced

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

Re: "Command Discovery In Emacs "


From: Condy Chen
Subject: Re: "Command Discovery In Emacs "
Date: Mon, 16 Aug 2021 21:33:28 +0800

By defining `foo' with

(defun foo (arg)
  (interactive "p" org-mode)
  (message "foo"))

M-x foo is still available in elisp-mode.

I'm using GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.17.4) of 2021-08-16

On Mon, Aug 16, 2021 at 9:24 PM Lars Ingebrigtsen <larsi@gnus.org> wrote:
Jean-Christophe Helary <lists@traduction-libre.org> writes:

> Ok, that's what I eventually guessed. So, the idea is to check whether
> a function is interactive and try to guess whether it is limited to a
> given mode (most probably the mode it is defined in), and if yes tag
> it ?

Yup.

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