From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Leaving out non-applicable commands on Mx Date: Sun, 10 Jan 2016 11:05:22 -0500 Message-ID: References: <87mvszdp6b.fsf@gnus.org> <8737u9kv6f.fsf@russet.org.uk> <87fuy7hdc6.fsf_-_@wanadoo.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1452441950 26958 80.91.229.3 (10 Jan 2016 16:05:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 Jan 2016 16:05:50 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lars Magne Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 10 17:05:41 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aIIUu-0008Sv-Q1 for ged-emacs-devel@m.gmane.org; Sun, 10 Jan 2016 17:05:40 +0100 Original-Received: from localhost ([::1]:47520 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIIUt-00007k-U4 for ged-emacs-devel@m.gmane.org; Sun, 10 Jan 2016 11:05:39 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33370) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIIUh-00007P-JU for emacs-devel@gnu.org; Sun, 10 Jan 2016 11:05:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aIIUd-0001CT-JU for emacs-devel@gnu.org; Sun, 10 Jan 2016 11:05:27 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:26673) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIIUd-0001CO-Fb for emacs-devel@gnu.org; Sun, 10 Jan 2016 11:05:23 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AxFgA731xV/xQDr7hcgxCEAoVVu0CHSwQCAoE8OhMBAQEBAQEBgQpBBYNdAQEDAVYjBQsLNBIUGA0kiDcIzyMBAQgBAQEBHos6hQUHhC0Fi0Rspw+BRSOEFiCCeAEBAQ X-IPAS-Result: A0AxFgA731xV/xQDr7hcgxCEAoVVu0CHSwQCAoE8OhMBAQEBAQEBgQpBBYNdAQEDAVYjBQsLNBIUGA0kiDcIzyMBAQgBAQEBHos6hQUHhC0Fi0Rspw+BRSOEFiCCeAEBAQ X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="188585202" Original-Received: from 184-175-3-20.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([184.175.3.20]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 10 Jan 2016 11:05:23 -0500 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 323A0AE023; Sun, 10 Jan 2016 11:05:22 -0500 (EST) In-Reply-To: (Lars Magne Ingebrigtsen's message of "Sun, 10 Jan 2016 09:53:40 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:197973 Archived-At: > That would certainly help with discoverability of the global > commands, but would it also allow completing over the commands that are > applicable to the current mode(s)? I don't see why not. Basically (new-magic-declare "foo-" ) would be equivalent to adding (declare (mode-specific )) to all commands whose name start with "foo-" and which don't yet have a (mode-specific ...) declaration. > For instance, there are often commands that apply to similar modes > (for instance in the cc-mode family) that aren't necessarily named > what you might think, I think... Of course you can have several calls to (new-magic-declare "foo-" ) for different prefixes, and of course you don't have to use it (e.g. if there are more exceptions than cases which follow the rule). Stefan