From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Smarter M-x that filters on major-mode Date: Thu, 11 Feb 2021 16:16:42 +0200 Message-ID: <83y2fuheph.fsf@gnu.org> References: <8ed9b43502ae1480e06b@heytings.org> <83r1lohqoc.fsf@gnu.org> <87wnvfenry.fsf@gnus.org> <87blcrdlqf.fsf@gnus.org> <87v9aydg3f.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18160"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 11 15:29:16 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lACy4-0004ZU-2t for ged-emacs-devel@m.gmane-mx.org; Thu, 11 Feb 2021 15:29:16 +0100 Original-Received: from localhost ([::1]:56020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lACy3-0006xH-2L for ged-emacs-devel@m.gmane-mx.org; Thu, 11 Feb 2021 09:29:15 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56154) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAClt-0007ho-GY for emacs-devel@gnu.org; Thu, 11 Feb 2021 09:16:41 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42079) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAClt-0007kA-0i; Thu, 11 Feb 2021 09:16:41 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2131 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lAClr-00089b-4V; Thu, 11 Feb 2021 09:16:40 -0500 In-Reply-To: <87v9aydg3f.fsf@gnus.org> (message from Lars Ingebrigtsen on Thu, 11 Feb 2021 12:00:20 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:264380 Archived-At: > From: Lars Ingebrigtsen > Date: Thu, 11 Feb 2021 12:00:20 +0100 > Cc: emacs-devel@gnu.org > > I started tinkering with this -- I've now got > > (defun foo (arg) > (command foo-mode "p")) > > working in the sense that it doesn't do anything. :-) That is, that's > now 100% equivalent to `interactive'. > > But I'm wondering where to stash the mode. Well, for uncompiled > functions, that's kinda obvious, but byte-compiled functions stash this > in the sixth slot in the bytecode object. Would it make sense to store that info in the plist of the function's symbol?