From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: looking up a submenu keymap in a menu keymap, when the submenu key is a string Date: Mon, 09 Oct 2006 12:57:15 -0400 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1160413275 29025 80.91.229.2 (9 Oct 2006 17:01:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 9 Oct 2006 17:01:15 +0000 (UTC) Cc: Emacs-Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 09 19:01:13 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GWyRY-00070Q-5P for ged-emacs-devel@m.gmane.org; Mon, 09 Oct 2006 18:57:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GWyRX-0000zu-Nl for ged-emacs-devel@m.gmane.org; Mon, 09 Oct 2006 12:57:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GWyRK-0000wY-A5 for emacs-devel@gnu.org; Mon, 09 Oct 2006 12:57:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GWyRJ-0000u8-93 for emacs-devel@gnu.org; Mon, 09 Oct 2006 12:57:17 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GWyRJ-0000ts-13 for emacs-devel@gnu.org; Mon, 09 Oct 2006 12:57:17 -0400 Original-Received: from [209.226.175.110] (helo=tomts43-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GWyYt-0003HV-Jq for emacs-devel@gnu.org; Mon, 09 Oct 2006 13:05:07 -0400 Original-Received: from pastel.home ([70.53.194.105]) by tomts43-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20061009165715.OSBY1596.tomts43-srv.bellnexxia.net@pastel.home> for ; Mon, 9 Oct 2006 12:57:15 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 846DB80AA; Mon, 9 Oct 2006 12:57:15 -0400 (EDT) Original-To: "Drew Adams" In-Reply-To: (Drew Adams's message of "Mon\, 9 Oct 2006 08\:36\:25 -0700") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:60548 Archived-At: > I map over a keymap with `map-keymap', so I have the `event' and `binding' > arguments. I build an alist of (name . binding) pairs, where `name' is a > string that includes external names of the key and its command, or "..." for > a prefix map - examples: > "C-a = beginning-of-line" > "C-x = ..." So that's why you rely crucially on read-kbd-macro being an exact inverse of single-key-description? Sounds like bad design. Why not return an alist of the form (name key binding) so you can always trivially recover the `key' from the name, without even using read-kbd-macro? Stefan