From: Heime <heimeborgia@protonmail.com>
To: Sharon Kimble <boudiccas@skimble09.plus.com>
Cc: Heime via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org>
Subject: Re: Submenu with easy-menu-define yielding invalid menu item
Date: Wed, 19 Oct 2022 21:04:29 +0000 [thread overview]
Message-ID: <uibYcV4El_Dcr-tFR46k06DSVOIVfI-X5CfBVMAyVlKVBMQ89VjrqdXu8EqVqnUOTVoOCM0bbEfIC9_8qpTz6USnduIaZMuFm5PRMd3SN5I=@protonmail.com> (raw)
In-Reply-To: <87mt9syqsy.fsf@skimble09.plus.com>
------- Original Message -------
On Wednesday, October 19th, 2022 at 11:51 AM, Sharon Kimble <boudiccas@skimble09.plus.com> wrote:
> Heime via Users list for the GNU Emacs text editor help-gnu-emacs@gnu.org writes:
>
> > I am making menus with "easy-menu-define". But I am having difficulty calling the submenu "dingo-outline-subm"
> > from "easy-menu-define". Would appreciate some assistance figuring out the problem.
> >
> > The error captured is
> >
> > Lisp error: (error "Invalid menu item in easymenu")
> >
> > ---------------------
> >
> > ;; Make submenu outline
> >
> > (defvar dingo-outline-subm
> >
> > '("Outline"
> >
> > ["Hide Direct Body" outline-hide-entry :help "Hide Entry"]
> >
> > ["Expose Direct Body" outline-show-entry :help "Show Entry"]
> >
> > ["Expose Headings" outline-hide-body :help "Hide Body"])
> >
> > "Submenu giving outline capability.")
> >
> > ;; Make top menu dingo
> >
> > (defun dingo-easym ()
> >
> > "Dingo easy menu."
> >
> > (easy-menu-define dingo-menu global-map "Dingo"
> >
> > '("Dingo"
> >
> > dingo-outline-subm
> >
> > ["Hide Entry" outline-hide-entry t]
> >
> > ["Show Entry" outline-show-entry t]
> >
> > ["Hide Body" outline-hide-body t])) )
>
>
> If it helps this is a very small part of my 'easy-menu'
>
> =====
> (easy-menu-define sk-menu global-map "menu"
> '("Mono"
> ("Misc" ;; submenu
> ["Wrap Text" auto-fill-mode]
> ["Get colours" list-colors-display]
> ["Delete this file" delete-this-file]
> ["call paradox - package manager" paradox-list-packages]
> ["Show my cheatsheet" cheatsheet-show]
> ["typewriter-mode" centered-cursor-mode]
> ["Tea brewing time" tea-timer]
> ["Show current key-bindings" show-key-command]
> ["Set the font size" set-font-size]
>
> )
> ))
> =====
Sharon, I can see you are using the [] construct to a list, which I can use
with defvar or defconst when the latter two construct a list.
Then the solution would be
["Outline" dingo-outline-subm t]
where one uses a defvar list rather than a callable function as done in
["Hide Entry" outline-hide-entry t]
> --
> A taste of linux = http://www.sharons.org.uk
> TGmeds = http://www.tgmeds.org.uk
> DrugFacts = https://www.drugfacts.org.uk
> Debian 11.5, fluxbox 1.3.7, emacs 29.0.50, org 9.5.5
prev parent reply other threads:[~2022-10-19 21:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-19 1:44 Submenu with easy-menu-define yielding invalid menu item Heime via Users list for the GNU Emacs text editor
2022-10-19 2:49 ` Emanuel Berg
2022-10-19 14:33 ` Heime
2022-10-19 11:51 ` Sharon Kimble
2022-10-19 12:49 ` Emanuel Berg
2022-10-19 20:23 ` Heime
2022-10-19 21:04 ` Heime [this message]
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='uibYcV4El_Dcr-tFR46k06DSVOIVfI-X5CfBVMAyVlKVBMQ89VjrqdXu8EqVqnUOTVoOCM0bbEfIC9_8qpTz6USnduIaZMuFm5PRMd3SN5I=@protonmail.com' \
--to=heimeborgia@protonmail.com \
--cc=boudiccas@skimble09.plus.com \
--cc=help-gnu-emacs@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.