From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#69306: 30.0.50; defining menu-items with :enable enables them unconditionally Date: Fri, 23 Feb 2024 07:23:19 -0500 Message-ID: References: <87zfvtmm5h.fsf@strawberrytea.xyz> <86bk89m25w.fsf@gnu.org> <87edd4yyyn.fsf@strawberrytea.xyz> <86le7b1w5a.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35546"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 69306@debbugs.gnu.org, StrawberryTea To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 23 13:34:32 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1rdUl6-00090U-1B for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Feb 2024 13:34:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdUkn-0006Pa-BY; Fri, 23 Feb 2024 07:34:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rdUjH-0006Fb-L1 for bug-gnu-emacs@gnu.org; Fri, 23 Feb 2024 07:32:40 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rdUjH-0001z0-3p for bug-gnu-emacs@gnu.org; Fri, 23 Feb 2024 07:32:39 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rdUje-0003rC-B5 for bug-gnu-emacs@gnu.org; Fri, 23 Feb 2024 07:33:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Feb 2024 12:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69306 X-GNU-PR-Package: emacs Original-Received: via spool by 69306-submit@debbugs.gnu.org id=B69306.170869157114791 (code B ref 69306); Fri, 23 Feb 2024 12:33:02 +0000 Original-Received: (at 69306) by debbugs.gnu.org; 23 Feb 2024 12:32:51 +0000 Original-Received: from localhost ([127.0.0.1]:35883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdUjS-0003qU-4i for submit@debbugs.gnu.org; Fri, 23 Feb 2024 07:32:50 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:38259) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdUjP-0003qA-Na for 69306@debbugs.gnu.org; Fri, 23 Feb 2024 07:32:48 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D68F44414A7; Fri, 23 Feb 2024 07:23:23 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1708691002; bh=p+GbBLKEtJb7Or0A3EAEFfyOpmXjYT5xhN8rzm7PWO0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=caXnnlVbB4Dt88fPN8Hff6+HxiQXC3qOJ3tWjImTrnVec37tiSpgM4cgbn9i2qeF0 FGKWP0wXgXxn+4Jg3Nr43hhSWqLSW7uKCMC2vYQ0XgL56rNo2i86dmmfX6C8ED9YFd lUkCiR0wAG/+/87aDIWKK7JfRed5nUaCLOTviiE8EE9AywkCAiLz+mNy3aL4FOXkr4 DQTi4PJaETg7BCkJT84e7P/6pzGL21ZAI8BkaFbD0fwa7vJw1nXVM2fDHOOy57UhA9 5Pa0pNjZzcoEi9Xu7BbXtSlhXyuo58sr0qXUCJYAmfZQKGMmw40utz2Xr/r4hLL1VH KM5WLxgxRpNmA== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 757FC44150E; Fri, 23 Feb 2024 07:23:22 -0500 (EST) Original-Received: from pastel (unknown [45.72.205.238]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4DAD71202DC; Fri, 23 Feb 2024 07:23:22 -0500 (EST) In-Reply-To: <86le7b1w5a.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 23 Feb 2024 09:23:45 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:280493 Archived-At: > If you expect that the key binding will be disabled via :enable, then > I don't think this is supported except in menus (and tool bars and tab > bars): the value is evaluated by the menu-related code, when it > actually displays the menu, and in your case there's no menu. The > :filter attribute is interpreted differently, so it just happens to > work. But that's sheer luck, I'd say. Indeed, the `:enable` thingy controls only whether the entry is present in the (a) menu, whereas the `:filter` is obeyed by the keymap lookup code. We could treat this as a feature request to make the keymap lookup code obey `:enable` as well. I remember thinking about doing it. I can't remember whether that would be easy to do but I can't think of a good reason why it wouldn't be. Stefan