GNU bug report logs - #69306
30.0.50; defining menu-items with :enable enables them unconditionally

Previous Next

Package: emacs;

Reported by: StrawberryTea <look <at> strawberrytea.xyz>

Date: Wed, 21 Feb 2024 23:31:01 UTC

Severity: normal

Found in version 30.0.50

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: StrawberryTea <look <at> strawberrytea.xyz>
Cc: 69306 <at> debbugs.gnu.org
Subject: bug#69306: 30.0.50; defining menu-items with :enable enables them unconditionally
Date: Thu, 22 Feb 2024 08:41:15 +0200
> From: StrawberryTea <look <at> strawberrytea.xyz>
> Date: Wed, 21 Feb 2024 17:26:02 -0600
> 
> Hi. I am not sure if I open a vanilla Emacs session and evaluate:
> (defvar hello nil)
> (setq hello nil)
> (define-key global-map (kbd "C-M-S-f") '(menu-item "" delete-backward-char :enable hello))
> 
> and then press C-M-S-f, the delete-backward-char menu item will be
> enabled, even though hello is nil.

Enabled where?  After evaluating the above, I don't see your menu item
anywhere (since it is not added to any existing menu, I guess?), so
I'm not sure what you are describing here.  Is some step missing from
the recipe?  Can you show a full recipe starting from "emacs -Q"?




This bug report was last modified 1 year and 148 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.