unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* problem with easymenu :filter submenus in Emacs 20.7
@ 2002-09-24 22:42 Neil W. Van Dyke
  0 siblings, 0 replies; only message in thread
From: Neil W. Van Dyke @ 2002-09-24 22:42 UTC (permalink / raw)


When I use the standard `easymenu' package to add to the menu-bar a menu
with a `:filter' submenu under FSF Emacs 20.7, selected actions on the
parent menu are executed as the user would expect, but selected actions
on the submenu are not executed.

This code reproduces the problem:


(require 'easymenu)

(defvar my-menu)
(easy-menu-define my-menu
		  (current-global-map)
		  "My Docstring"
		  '("My Menu"
		    ["Alpha"   (my-action 'alpha)]
		    ["Bravo"   (my-action 'bravo)]
		    ["Charlie" (my-action 'charlie)]
		    ("Submenu" :filter my-submenu-filter)))

(defun my-submenu-filter (menu)
  (easy-menu-filter-return 
   (easy-menu-create-menu "My Submenu"
                          '(["Delta"         (my-action 'delta)]
                            ["Echo (Symbol)" my-action-echo]
                            ["Foxtrot"       (my-action 'foxtrot)]))))

(defun my-action (&rest args)
  (interactive)
  (insert (format "{my-action %S}" args)))

(defun my-action-echo ()
  (interactive)
  (insert "{my-action-echo}"))


What am I doing wrong?

My current need is for porting to FSF Emacs 20 a package that is already
working under FSF Emacs 21 and XEmacs 21.

Thanks,
Neil

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-09-24 22:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-24 22:42 problem with easymenu :filter submenus in Emacs 20.7 Neil W. Van Dyke

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 read-only IMAP folder(s) and NNTP newsgroup(s).