Subject: bug#69306: 30.0.50; defining menu-items with :enable enables them unconditionally

From: Stefan Monnier <[email-masked]>
Date: Fri, 23 Feb 2024 07:23:19 -0500

> 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