From xemacs-m  Sat Sep 20 22:23:35 1997
Received: from server.sensei.co.uk (server.sensei.co.uk [193.132.124.5])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id WAA06204
	for <xemacs-beta@xemacs.org>; Sat, 20 Sep 1997 22:23:34 -0500 (CDT)
Received: from cerise.sensei.co.uk (glynn@muvies.demon.co.uk [158.152.66.14]) by server.sensei.co.uk (8.8.5/8.8.2) with ESMTP id EAA15538; Sun, 21 Sep 1997 04:23:30 +0100
Received: (from glynn@localhost) by cerise.sensei.co.uk (8.8.5/8.8.2) id EAA09599; Sun, 21 Sep 1997 04:27:30 +0100
Date: Sun, 21 Sep 1997 04:27:30 +0100
Message-Id: <199709210327.EAA09599@cerise.sensei.co.uk>
From: Glynn Clements <glynn@sensei.co.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: Hrvoje Niksic <hniksic@srce.hr>
Cc: XEmacs Developers <xemacs-beta@xemacs.org>
Subject: Re: A problem with menu accelerators
In-Reply-To: <kigk9gb4fg3.fsf@jagor.srce.hr>
References: <kigk9gb4fg3.fsf@jagor.srce.hr>
X-Mailer: VM 6.34 under 20.3 "Minsk" XEmacs  Lucid (beta22)


Hrvoje Niksic wrote:

> I have spotted a problem in the (otherwise terrific!) design of menu
> accelerators.  The trouble is, if you define your menus to have random 
> %_ within the entry strings, then the simple things like
> 
> (add-menu-button '("File") "ha ha")
> 
> will not only miss the '("%_File") menu item, but they will add a
> new '("File") menu item to the menubar.  Yuck!
> 
> There are two ways of handling this:
> 
> 1) implement that the %_ are somehow ignored within any strings in
>    menubar functions;
> 
> 2) think out a new interface for adding accelerators, separating them
>    from the strings.
> 
> Solution #1 is hard to implement, but easy to use.  #2 is easy to
> implement, but hard to use.  Which one is worse, and which one is
> better?

Well, #1 is the Motif way, with the mnemonic being set by resources, e.g.

	*menubar.file.mnemonic:		F

However, XEmacs isn't exactly your average Xt app, so this may be more 
trouble than it's worth.

-- 
Glynn Clements <glynn@sensei.co.uk>

