emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

easymenu suffix problem?


From: Glenn Morris
Subject: easymenu suffix problem?
Date: Sat, 24 Nov 2007 22:01:04 -0500
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]