unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Condy Chen <condy0919@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Jean-Christophe Helary <lists@traduction-libre.org>,
	Emacs Devel <emacs-devel@gnu.org>
Subject: Re: "Command Discovery In Emacs "
Date: Mon, 16 Aug 2021 21:33:28 +0800	[thread overview]
Message-ID: <CAHO21CKmQQHKbf9p2wBXH-OYZ22KuJYtKJPML0K+WKts_Ju-Jg@mail.gmail.com> (raw)
In-Reply-To: <87r1eta5go.fsf@gnus.org>

[-- Attachment #1: Type: text/plain, Size: 744 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1346 bytes --]

  reply	other threads:[~2021-08-16 13:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-16  5:31 "Command Discovery In Emacs " Jean-Christophe Helary
2021-08-16 11:38 ` Lars Ingebrigtsen
2021-08-16 12:29   ` Jean-Christophe Helary
2021-08-16 12:56     ` Lars Ingebrigtsen
2021-08-16 13:15       ` Jean-Christophe Helary
2021-08-16 13:23         ` Lars Ingebrigtsen
2021-08-16 13:33           ` Condy Chen [this message]
2021-08-16 13:43             ` Lars Ingebrigtsen
2021-08-16 13:46               ` Condy Chen
2021-08-16 14:58   ` Stephen Berman
2021-08-16 15:49     ` Eli Zaretskii
2021-08-16 16:13       ` Stephen Berman
2021-08-16 16:32         ` Eli Zaretskii
2021-08-16 17:17           ` Stephen Berman
2021-08-16 20:58             ` Stephen Berman
2021-08-16 20:59         ` Matthias Meulien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHO21CKmQQHKbf9p2wBXH-OYZ22KuJYtKJPML0K+WKts_Ju-Jg@mail.gmail.com \
    --to=condy0919@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --cc=lists@traduction-libre.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).