all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* easymenu suffix problem?
@ 2007-11-25  3:01 Glenn Morris
  2007-11-26  3:45 ` Glenn Morris
  2008-01-15 22:33 ` Stefan Monnier
  0 siblings, 2 replies; 6+ messages in thread
From: Glenn Morris @ 2007-11-25  3:01 UTC (permalink / raw)
  To: emacs-devel


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.

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

end of thread, other threads:[~2008-01-15 22:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-25  3:01 easymenu suffix problem? Glenn Morris
2007-11-26  3:45 ` 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

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.