From: Glenn Morris <rgm@gnu.org>
To: emacs-devel@gnu.org
Subject: easymenu suffix problem?
Date: Sat, 24 Nov 2007 22:01:04 -0500 [thread overview]
Message-ID: <pjzlx381vz.fsf@fencepost.gnu.org> (raw)
With a window-system:
emacs -Q -f calendar
C-h k on the "Holidays" menu, "For Year 2007".
you get:
<menu-bar> <Holidays> <For Year> runs the command menu-function-1
...
You get the same binding to menu-function-1 for each "For Year XXXX"
entry, which means one always gets the holidays for 2002, no matter
which item one clicks.
Each menu-item in the menu has name "For Year" (sans suffix), which is
presumably why they all end up running the same command (for the first
entry).
Is this an easymenu problem? This menu is created with:
(easy-menu-define nil calendar-mode-map nil cal-menu-holidays-menu)
cal-holidays-menu has a structure like:
["For Year"
(lambda nil
(interactive)
(holiday-list (+ displayed-year -5) (+ displayed-year -5)))
:suffix (number-to-string (+ displayed-year -5))]
["For Year"
(lambda nil
(interactive)
(holiday-list (+ displayed-year -4) (+ displayed-year -4)))
:suffix (number-to-string (+ displayed-year -4))]
So, the :suffix part is only affecting the _label_ associated with the
menu-item, not the actual _name_ of the item in the keymap. Is this
how it is supposed to work? I can't see that this would be much use.
next reply other threads:[~2007-11-25 3:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-25 3:01 Glenn Morris [this message]
2007-11-26 3:45 ` easymenu suffix problem? Glenn Morris
2007-11-26 15:01 ` Stefan Monnier
2007-11-27 3:03 ` Glenn Morris
2007-11-27 4:26 ` Stefan Monnier
2008-01-15 22:33 ` 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=pjzlx381vz.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--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.