From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Smarter M-x that filters on major-mode Date: Thu, 11 Feb 2021 19:57:18 +0100 Message-ID: <87im6ywhyp.fsf@gnus.org> References: <8ed9b43502ae1480e06b@heytings.org> <83r1lohqoc.fsf@gnu.org> <87wnvfenry.fsf@gnus.org> <87blcrdlqf.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16186"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: bugs@gnu.support, Stefan Kangas , gregory@heytings.org, emacs-devel@gnu.org, "Alfred M. Szmidt" , Matt Armstrong , Eli Zaretskii To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 11 19:58:52 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 1lAHAy-00044l-H5 for ged-emacs-devel@m.gmane-mx.org; Thu, 11 Feb 2021 19:58:52 +0100 Original-Received: from localhost ([::1]:48092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAHAx-0002y5-I2 for ged-emacs-devel@m.gmane-mx.org; Thu, 11 Feb 2021 13:58:51 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46170) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAH9p-000264-QM for emacs-devel@gnu.org; Thu, 11 Feb 2021 13:57:42 -0500 Original-Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:47672) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAH9n-0004cp-VZ; Thu, 11 Feb 2021 13:57:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=PgKem5eT8brKkmqh6W3JF5yuX0uZrPS60wVhNRmBvbQ=; b=QAvDuETQTolzRZAtggJAlNWzjs Ev2GV0bXGPxxRkicD5qGPNrhHqvW14Z1/5/qo+Hby4CCx/hQYEoKn7vVBoXE/BrgA9MBOBt72sucj M3ecpVKX8RqKv48+oYKl2o/ZshXzhHMqjhI2N7kesSJXtq6OWhXfq+G55Gr4w6vL7gUI=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lAH9U-00067p-RH; Thu, 11 Feb 2021 19:57:31 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAG1BMVEUpJisPDBBXVFp8 fYShoqe9vsTR09jw8fL////l0XS0AAAAAWJLR0QIht6VegAAAAd0SU1FB+UCCxI2OncuyykAAAG4 SURBVDjLpdLNktowDABgJZPhbJU+QPDC9kohpVd2semV7sTh2tnB8gu09utX+bXD0lPFgYm+kSX/ QAa5lE+V0sYYpXayBMgQMwQUIKWslOK0Ou1kl+cARCG7kja/l3MopdwrdQ52XKlbCkVe5lyiHdHt DoAH+BGsIeJ8AtCCpzbehhYdIAMU3rf0G9oEihEEFCF4ct5tZ8B/DF0ce4AJFtTDpQPuNMKhcW3e HbGvyIYeQhtybZvXft9jc8RDB8GeZsAfZ8vDBm9mFTwcbqiximr1ikOMUDRElmy9+gCax/LuHR+B d3SZQTvV0jTE5368A77gSnN7k91BhplYE5lfeA/8Ew3ZN5GCKLkAyyWvRNejgAk+bfluS8mnZbX9 s5ZQwgBq/XTSujY88c2YqpDbAfan5VrzS2yCMzdbF7AaeuyKXDd8JFdvrCWT50NFO9Yz54fLpVU8 Esi/7VWlTr18nYCPf+PCFC8J4Cbmw8/pojgWMe8vacV/AT0EzzCb6kuE8BhccDP4HoHSneMhgVUK OoLNEhBqAn/DBJZ1hPcUPpt/wCICbxwiPFs3wUv3ZAc422sEwU8rw79xYN9+0S2V8QAAACV0RVh0 ZGF0ZTpjcmVhdGUAMjAyMS0wMi0xMVQxODo1NDo1OCswMDowMIJxIDEAAAAldEVYdGRhdGU6bW9k aWZ5ADIwMjEtMDItMTFUMTg6NTQ6NTgrMDA6MDDzLJiNAAAAAElFTkSuQmCC X-Now-Playing: Bertine Zetlitz's _Beautiful So Far_: "Fate" In-Reply-To: (Stefan Monnier's message of "Thu, 11 Feb 2021 09:38:10 -0500") Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:264421 Archived-At: Stefan Monnier writes: > How 'bout > > (declare (M-x-pred EXP)) > > which turns into > > (define-symbol-prop '[SYM] (lambda () EXP)) > > so EXP can be (derived-mode-p 'foo-mode) or it can be nil, or ... Found a new thing this could be used for -- buttons. They usually have a local keymap, and don't make sense unless executed with point on the button. Should be an easy enough predicate to add here... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no