From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/54103 Path: main.gmane.org!not-for-mail From: Norman Walsh Newsgroups: gmane.emacs.gnus.general Subject: OT emacs question, please forgive me :-) Date: Mon, 29 Sep 2003 13:54:33 -0400 Sender: ding-owner@lists.math.uh.edu Message-ID: <87vfrbtr8m.fsf@nwalsh.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1064864908 21435 80.91.224.253 (29 Sep 2003 19:48:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 29 Sep 2003 19:48:28 +0000 (UTC) Original-X-From: ding-owner+M2644@lists.math.uh.edu Mon Sep 29 21:48:26 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A440P-0005fZ-00 for ; Mon, 29 Sep 2003 21:48:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1A43zz-0006o9-00; Mon, 29 Sep 2003 14:48:00 -0500 Original-Received: from justine.libertine.org ([66.139.78.221]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1A42Es-0006P4-00 for ding@lists.math.uh.edu; Mon, 29 Sep 2003 12:55:14 -0500 Original-Received: from brmea-mail-3.sun.com (brmea-mail-3.Sun.COM [192.18.98.34]) by justine.libertine.org (Postfix) with ESMTP id 05CEF3A0063 for ; Mon, 29 Sep 2003 12:55:09 -0500 (CDT) Original-Received: from eastmail1bur.East.Sun.COM ([129.148.9.49]) by brmea-mail-3.sun.com (8.12.10/8.12.9) with ESMTP id h8THt7kv015473 for ; Mon, 29 Sep 2003 11:55:08 -0600 (MDT) Original-Received: from suneast.East.Sun.COM (suneast.East.Sun.COM [129.148.9.3]) by eastmail1bur.East.Sun.COM (8.12.9+Sun/8.12.9/ENSMAIL,v2.2) with ESMTP id h8THt7fM016072 for ; Mon, 29 Sep 2003 13:55:07 -0400 (EDT) Original-Received: from mercury (vpn-129-150-17-118.SFBay.Sun.COM [129.150.17.118]) by suneast.East.Sun.COM (8.12.9+Sun/8.12.5) with ESMTP id h8THt68N029694 for ; Mon, 29 Sep 2003 13:55:06 -0400 (EDT) Original-Received: from ndw by mercury with local (Exim 3.36 #1 (Debian)) id 1A42ED-0003q4-00 for ; Mon, 29 Sep 2003 13:54:33 -0400 Original-To: ding@gnus.org X-URL: http://nwalsh.com/ User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:54103 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:54103 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I can't tell if my ISP is providing proper newsgroup access or not. So I don't know if my post to gnus.emacs.help actually went anywhere. I know this is off-topic, and I humbly beg your forgiveness. OTOH, you're all a whole lot more elisp skilled than I, so perhaps the answer is obvious and you'd be gracious enough to point me in the right direction. I'm guessing there must be some way to do this other than brute force. I have an alist: (defvar my-alist '(("choice1" . "opt1") ("choice2" . 35) ("choice3" . "opt3"))) I want to make a menu-bar menu that contains choice1, choice2, choice3. If choice1 is selected, I want to evaluate (my-function "opt1"), If choice2 is selected, I want to evaluate (my-function 35), etc. I can see a brute-force solution: (defun my-function-opt1 () (interactive) (my-function "opt1")) (define-key menu-bar-my-menu [my-choice1] '("choice1" . my-function-opt1)) But it seems to me that it should be possible to build the menu bar from the alist. Alas, it's just beyond my elisp skills. Clues, please? Be seeing you, norm - -- Norman Walsh | Many eyes go through the meadow, but http://nwalsh.com/ | few see the flowers in it.--Ralph Waldo | Emerson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) Comment: Processed by Mailcrypt 3.5.8 iD8DBQE/eHHYOyltUcwYWjsRAsLPAJ9GBiFXmOLBNb4IU2Vwm772eK9AWQCePHHL 9O9PDjr0osLVAnknar6n6QA= =2fAa -----END PGP SIGNATURE-----