Subject: Re: bug#4471: menu-bar menu is undefined

From: Juri Linkov <[email-masked]>
Date: Tue, 03 Nov 2009 09:30:03 +0200

>> >  (defvar Buffer-menu-mode-map
>> >    (let ((map (make-keymap))
>> > -	(menu-map (make-sparse-keymap)))
>> > +	(menu-map (make-sparse-keymap "Buffer-Menu")))
>> >      (suppress-keymap map t)
>> >      (define-key map "v" 'Buffer-menu-select)
>> >      (define-key map "2" 'Buffer-menu-2-window)
>>
>> IIUC this is a correct way to fix it, indeed.
>> OTOH it would be better to make the non-toolkit code accept the same
>> keymaps as accepted by the toolkit code.
>
> I've checked in a change to keyboard.c, allowing the non-toolkit code to
> handle keymaps with no prompt strings.

Thank you.  The only remaining minor problem is that without prompt
strings the displayed menus have no titles.  The docstring of
`x-popup-menu' says:

  To give the menu a title, put a string into
  the keymap as a top-level element.

So without these prompt strings there are no menu titles.

I'm not sure if it's worth adding these strings explicitly
in every menu that still misses them, given that now such menus
can be displayed in non-toolkit builds (albeit without menu titles).

-- 
Juri Linkov
http://www.jurta.org/emacs/