Subject: bug#24237: 24.5; (elisp)`Extended Menu Items', :filter warning

From: Eli Zaretskii <[email-masked]>
Date: Sat, 19 Dec 2020 12:47:28 +0200

> Date: Sun, 13 Dec 2020 11:52:53 -0800 (PST)
> From: Drew Adams <[email-masked]>
> Cc: [email-masked], [email-masked],
>         Stefan Monnier
>  <[email-masked]>
> 
> > >  "use of a `menu-item' construct with a :filter
> > >   to create a conditional _keyboard_ key binding.
> > >   In such a case, the `menu-item' construct is not
> > >   a real menu item - it is not placed on any menu."
> > 
> > That doesn't explain anything to me, sorry.
> 
> Sorry.  Does an example help?
> 
> (global-set-key
>  "\C-o" 
>  '`(menu-item
>    "" forward-char
>    :filter (lambda (cmd)
>              (if (integerp prefix-arg) nil cmd))))

If this is never placed on the menu bar or on any pop-down menu, then
what the manual says is not relevant, because redisplay only considers
the menus that need to be displayed.