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: Sun, 08 Oct 2006 21:02:56 -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 1160355811 16624 80.91.229.2 (9 Oct 2006 01:03:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 9 Oct 2006 01:03:31 +0000 (UTC) Cc: Emacs-Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 09 03:03:29 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 1GWjY4-0000hq-00 for ged-emacs-devel@m.gmane.org; Mon, 09 Oct 2006 03:03:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GWjY3-0008Po-KF for ged-emacs-devel@m.gmane.org; Sun, 08 Oct 2006 21:03:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GWjXp-0008OZ-23 for emacs-devel@gnu.org; Sun, 08 Oct 2006 21:03:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GWjXm-0008OH-N5 for emacs-devel@gnu.org; Sun, 08 Oct 2006 21:02:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GWjXm-0008OE-IP for emacs-devel@gnu.org; Sun, 08 Oct 2006 21:02:58 -0400 Original-Received: from [209.226.175.188] (helo=tomts25-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GWjfD-0004bh-PP for emacs-devel@gnu.org; Sun, 08 Oct 2006 21:10:39 -0400 Original-Received: from pastel.home ([70.53.194.105]) by tomts25-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20061009010257.YTJB1747.tomts25-srv.bellnexxia.net@pastel.home> for ; Sun, 8 Oct 2006 21:02:57 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id E12B08098; Sun, 8 Oct 2006 21:02:56 -0400 (EDT) Original-To: "Drew Adams" In-Reply-To: (Drew Adams's message of "Sun\, 8 Oct 2006 11\:34\:59 -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:60535 Archived-At: > (keymap "Variables" > ("toto" "toto" lambda nil > (interactive) > (imenu--menubar-select > '("toto" . #)))) > `lookup-key' doesn't seem to help here - at least I cannot just pass > "Variables" as the key arg to it. You can try to pass ["Variables"]. But it's really not that simple, since you have to distinguish between the menu name and the "pseudo-key" associated with it. In your examples, both are strings and they are equal, but that's not necessarily the case. You may want o check the easy-menu functions for that, tho they're not always as "easy" to use as the name implies. Stefan