Gnus development mailing list
 help / color / mirror / Atom feed
* OT emacs question, please forgive me :-)
@ 2003-09-29 17:54 Norman Walsh
  2003-09-29 20:26 ` Reiner Steib
  0 siblings, 1 reply; 2+ messages in thread
From: Norman Walsh @ 2003-09-29 17:54 UTC (permalink / raw)


-----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 <ndw@nwalsh.com> | 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 <http://mailcrypt.sourceforge.net/>

iD8DBQE/eHHYOyltUcwYWjsRAsLPAJ9GBiFXmOLBNb4IU2Vwm772eK9AWQCePHHL
9O9PDjr0osLVAnknar6n6QA=
=2fAa
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: OT emacs question, please forgive me :-)
  2003-09-29 17:54 OT emacs question, please forgive me :-) Norman Walsh
@ 2003-09-29 20:26 ` Reiner Steib
  0 siblings, 0 replies; 2+ messages in thread
From: Reiner Steib @ 2003-09-29 20:26 UTC (permalink / raw)


On Mon, Sep 29 2003, Norman Walsh wrote:

> 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.

You should give the people there more than 2 hours to respond.

<URL:http://groups.google.com/groups?group=gnu.emacs.help>
<URL:http://groups.google.com/groups?selm=87y8w7ycm2.fsf%40nwalsh.com>

Additionally, gnu.emacs.help is the same as the list
"help-gnu-emacs@gnu.org".  See
<URL:http://mail.gnu.org/mailman/listinfo/help-gnu-emacs> and the
archives at <URL:http://mail.gnu.org/archive/html/help-gnu-emacs/>.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-09-29 20:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-29 17:54 OT emacs question, please forgive me :-) Norman Walsh
2003-09-29 20:26 ` Reiner Steib

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).