From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Current mode command discovery Date: Sun, 14 Feb 2021 21:37:53 +0200 Message-ID: References: <87v9aubm96.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17229"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 To: Lars Ingebrigtsen , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Feb 14 20:38:50 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 1lBNEH-0004PU-NX for ged-emacs-devel@m.gmane-mx.org; Sun, 14 Feb 2021 20:38:49 +0100 Original-Received: from localhost ([::1]:44988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lBNEG-0006mh-PQ for ged-emacs-devel@m.gmane-mx.org; Sun, 14 Feb 2021 14:38:48 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54794) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBNDU-0006K6-Ei for emacs-devel@gnu.org; Sun, 14 Feb 2021 14:38:01 -0500 Original-Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:42783) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lBNDS-0003KY-KL for emacs-devel@gnu.org; Sun, 14 Feb 2021 14:38:00 -0500 Original-Received: by mail-wr1-x431.google.com with SMTP id r21so6348410wrr.9 for ; Sun, 14 Feb 2021 11:37:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=hKf9UCxNWjkfFYeWkdBiGg+74SEhDiletV86n6Fyitg=; b=hX6Wc8kCu/uYeB3UeXenrV7w1ZXWKHnXPWQ0GH1TmJvHzRBGiybp12hp7vqGdN3Xub AwWfnKjj6jxEUgxihZXvbEHrrSnHSV8WrRHjHjrJih99NpiXEzNP5gDG+4hAaLjt5TJf IBgICRJo0yHxcpSVn95Esrnv3VQIpGTFeyVbFg+rIeEde3aANxUItJ9EwO1ZW/Ntkwax h4KJ3D+94hOKj6MJmSaBvHhhbwjNocGqIQElqgSkzySPFpohV259UPM5STHGEYkFOIt6 D9k3xb1n/1jqO5EN3l9zZkUaDHCpdMTVLhDDmZsTDBIR6mn+oS5Isp8xTPY0ZLhWv4ah a2bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=hKf9UCxNWjkfFYeWkdBiGg+74SEhDiletV86n6Fyitg=; b=djFu1wXILXgxxKYB9+xCxJWluPyo4U5z7paX/Ewdr4U8ubrgghA1fOxrafvzwWhrvM Rk8+ecEkAOQS/GyV96vyhbm96Q8emJL6B1B5f9JoGxSgs2zoKU/aF+9lHJpHsfuCjgvB M7/Nqaiz0HoqBK2QQjiR87/X5sgKms0CW5v39EBz9utpUeQ+gaEx5IWvGdwjsNUYWmYC epJspcZplVG7n8uFnQTiQZs7fxhip7atbqLYRgnyjkApJ/7FqSePilcxssbLQHW+43nw 5Nsxy2eFHmaO+VgCwaj0Jyim7uDSyNea02elhmbF+iivTMh6OScioPsa5CJ2sU7enQq/ FK6w== X-Gm-Message-State: AOAM531zs60UzmthAtNOdR1lD94PkiJecBbx0uIIH87oxbsv4TDMcyW6 R2ZDS0lBAGWlV3FSx0KRp3w3eKtY81Q= X-Google-Smtp-Source: ABdhPJz+uPhe/ldVR0wcWXE/CdK5GzrN2WpzxsKj5Mq3Nwo+4WVPO+c8vHQNIbqMwYBIZhgyifa9rA== X-Received: by 2002:a5d:4c82:: with SMTP id z2mr14215954wrs.220.1613331476391; Sun, 14 Feb 2021 11:37:56 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id s64sm22914170wms.21.2021.02.14.11.37.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 14 Feb 2021 11:37:55 -0800 (PST) In-Reply-To: <87v9aubm96.fsf@gnus.org> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=raaahh@gmail.com; helo=mail-wr1-x431.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:264773 Archived-At: On 14.02.2021 19:19, Lars Ingebrigtsen wrote: > This would only be commands that have been marked for the current major > mode and any active minor modes, I guess? BTW, you might be interested in this alternative approach (see smex-major-mode-commands): https://github.com/nonsequitur/smex/blob/master/smex.el#L120-L129 No (declare ...) or incompatible changes to 'interactive' necessary. Of course, it doesn't support arbitrary predicates. OTOH, it should reliably be fast enough.