all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Emacs Devel <emacs-devel@gnu.org>
Subject: Re: Format av menu keymaps
Date: Mon, 09 Jan 2006 23:21:51 -0500	[thread overview]
Message-ID: <87k6d8k98r.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <43C2F87B.1030401@student.lu.se> (Lennart Borgman's message of "Tue, 10 Jan 2006 00:57:47 +0100")

>> There's something odd in this code snice for each iteration of map-keymap
>> you end up rebinding the same key with `define-key' so only ther last one
>> will have an effect.
> Yes, it is odd.  I am using map-keymap just to get the 'command'.  (There
> is only one entry in menu-bar-entry.) Is there another way?

So you assume there will only be one entry.  What happens if there are
2 entries?  If you know for sure that there'll only ever be 1 entry in that
map, is that the only thing you know about that map, or do you also know
more about it?

>> Why do you use `appmenu-get-submenu' to destructure the menu-item only to
>> rebuild it right after.
> The submenu I gave is just an example. I do not know the format of the
> submenu normally.

The question still stands: why massage the format, whichever it is: if it
works in [menu-bar] it should work where you'll use it, without touching it
at all.

> `appmenu-get-submenu' (see previous message) handles those two formats for
> a submenu that I have seen. There may be more, but I do not know.  Are
> there more?

I don't think so, although the (menu-item ...) format is sufficiently rich
that the way you handle it is incomplete.  See the elisp manual for
a complete description.


        Stefan

  reply	other threads:[~2006-01-10  4:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-08 22:27 Format av menu keymaps Lennart Borgman
2006-01-09  2:27 ` Stefan Monnier
2006-01-09 21:45   ` Lennart Borgman
2006-01-09 23:10     ` Stefan Monnier
2006-01-09 23:57       ` Lennart Borgman
2006-01-10  4:21         ` Stefan Monnier [this message]
     [not found]           ` <43C36D10.1050003@student.lu.se>
     [not found]             ` <jwvmzi43xn9.fsf-monnier+emacs@gnu.org>
2006-01-10 17:00               ` Lennart Borgman
2006-01-10 17:40                 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k6d8k98r.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.