[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Shall menu_bar_items and tool_bar_items look at text property keymap
Kim F. Storm
Re: Shall menu_bar_items and tool_bar_items look at text property keymaps?
13 Feb 2002 22:26:31 +0100
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50
"Stefan Monnier" <monnier+gnu/address@hidden> writes:
> > I was looking at the above functions and wondered whether it really
> > makes sense for those functions to look for menu-bar and tool-bar
> > bindings in the keymap and local-map properties of PT in the current
> > buffer?
> > I guess it makes sense in some specific cases that the menu bar or
> > tool bar changes dynamically depending on what kind of text is below
> > the cursor, but I was wondering whether it will actually work - as it
> > requires that the menu-bar and tool-bar are updated (or at least
> > checked for updates) every time the cursor moves...
> They are updated when they are activated (f.ex. when you click on
> the menubar to brinf down a menu), so it should work fine.
I cannot see how this can work reliable.
What if the keymap contain a new main menu item which is not currently
on the menu-bar ... then when you click on the menu-bar, it suddenly
changes ... and it wont change back if you move the cursor (until you
click on the menu-bar again).
This might be a minor problem for the menu-bar, but for the tool-bar,
it really doesn't make sense ... you say it is updated when you click
on the tool-bar, but how can you click on something which isn't shown
yet (and afterwards you may be able to click on something which isn't
Are you aware of any packages which actually relies on this?
Kim F. Storm <address@hidden> http://www.cua.dk