unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Neil W. Van Dyke" <neil@NOSPAMneilvandyke.org>
Subject: problem with easymenu :filter submenus in Emacs 20.7
Date: 24 Sep 2002 18:42:05 -0400	[thread overview]
Message-ID: <alit0vxb5u.fsf@neilvandyke.org> (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

                 reply	other threads:[~2002-09-24 22:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=alit0vxb5u.fsf@neilvandyke.org \
    --to=neil@nospamneilvandyke.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.
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).