* Re: key binding of `M-&' shows up in menu as (M-)
[not found] ` <46759B8B.3090100@gnu.org>
@ 2007-06-17 21:17 ` Lennart Borgman (gmail)
2007-06-18 6:14 ` Jan Djärv
0 siblings, 1 reply; 2+ messages in thread
From: Lennart Borgman (gmail) @ 2007-06-17 21:17 UTC (permalink / raw)
To: Jason Rumney; +Cc: Eli Zaretskii, Jan Djärv, Emacs Devel
Jason Rumney wrote:
Eli suggested to move this discussion to Emacs Devel so I am doing that now.
> Lennart Borgman (gmail) wrote:
>> Unfortunately I do not think that is the right change. This totally
>> spoils the possibility to use accelerators for the menus on w32. I do
>> not think the minor problem it solves justifies that.
>
> For now, it is the right change. In future when accelerators are
> supported, they will need to be supported in a cross platform way
> anyway, and this bug will still exist, so avoiding fixing this bug now
> will not help us later.
Probably you are right, but as I said it breaks the possibility to use
menu accelerators at all on w32 now.
Since I am doing that right now in EmacsW32 I think it is a bit
unfortunate. I do not want to maintain yet another patch.
>> The reasonable value is in my opinion the position for the
>> accelerator within *name.
>
> Generally accelerators are defined by a character, not position. The
> first occurrence of that character gets underlined by the toolkit. But
> we need to check all toolkits that Emacs supports to be sure that this
> is sufficient information.
Yes, that does not matter very much, but adding the character instead is
probably easier to understand.
Since the accelerator AFAICS must be a character in all toolkits adding
this is what have to be done.
What must be defined is the lisp interface for this. So, again, adding
something like
(menu-item ...
:acc-char ...)
seems right to me.
That far I do not see any problems.
For the implementation of giving this information to the menu routines
on w32 it might be best to just enhance Eli's patch with this. (Another
possibility would be to add a new string, say *acc-name, a version with
accelarator info added. But such an implementation is a bit less generic.)
I do not care about the exact details as long as the implementation is
generic enough. What I care about is that we do this.
I remember Jan knew the requirements for one of the toolkits. That
toolkit handled accelerators similar to w32, but instead of the char &
the char _ was just to mark the accelerator in the menu string.
^ permalink raw reply [flat|nested] 2+ messages in thread