unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Christopher Dimech <dimech@gmx.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: Heime <heimeborgia@protonmail.com>,
	Emanuel Berg <incal@dataswamp.org>,
	"help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: RE: [External] :  About Package using a menu
Date: Tue, 18 Oct 2022 23:23:27 +0200	[thread overview]
Message-ID: <trinity-0136f41c-734d-43f3-913e-ed4dbdc6001b-1666128207112@3c-app-mailcom-bs10> (raw)
In-Reply-To: <SJ0PR10MB54888FB134CA4970F1F39044F3289@SJ0PR10MB5488.namprd10.prod.outlook.com>

> Sent: Wednesday, October 19, 2022 at 8:35 AM
> From: "Drew Adams" <drew.adams@oracle.com>
> To: "Heime" <heimeborgia@protonmail.com>
> Cc: "Christopher Dimech" <dimech@gmx.com>, "Emanuel Berg" <incal@dataswamp.org>, "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
> Subject: RE: [External] : Re: About Package using a menu
>
> > Have managed to display a parent menu.
> > Would you holp a bit on how to insert a submenu?
>
> Nope; sorry, too busy.  Hopefully someone else will
> pitch in.  Or maybe you'll find the answer yourself
> first, as you did for your other questions (e.g.,
> how to display a parent menu).

Dear Heime,

Here is a submenu that works as you wish.

(defvar xepty-menu (make-sparse-keymap "xepty"))
(defvar daphne-menu (make-sparse-keymap "daphne"))

;; Here is the xepty parent menu

(define-key-after global-map [menu-bar xepty-menu]
  (cons "Xepty" (make-sparse-keymap "xepty")) 'tools)

;; Here you get the daphne submenu

(define-key-after global-map [menu-bar xepty-menu daphne-menu]
  (cons "Daphne" (make-sparse-keymap "daphne")) 'kill-buffer)

;; Here you append function commands in daphne submenu

(define-key global-map [menu-bar xepty-menu daphne-menu bash]
	    '("Bash" . sh-mode))

;; Here you append another function command in daphne submenu

(define-key global-map [menu-bar xepty-menu daphne-menu elisp]
	    '("Emacs Lisp" . emacs-lisp-mode))





      parent reply	other threads:[~2022-10-18 21:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-17 23:15 About Package using a menu Heime via Users list for the GNU Emacs text editor
2022-10-17 23:21 ` Emanuel Berg
2022-10-18 10:52   ` Heime
2022-10-18 11:02   ` Christopher Dimech
2022-10-18 15:37     ` [External] : " Drew Adams
2022-10-18 17:32       ` Heime
2022-10-18 18:14         ` Drew Adams
2022-10-18 19:12           ` Heime
2022-10-18 19:31             ` Heime
2022-10-19  5:33               ` Jean Louis
2022-10-19  9:28                 ` Emanuel Berg
2022-10-19 14:31                 ` Heime
2022-10-19 20:21                   ` Emanuel Berg
2022-10-18 20:35             ` Drew Adams
2022-10-18 20:14           ` Heime
2022-10-18 20:35             ` Drew Adams
2022-10-18 20:56               ` Heime
2022-10-18 21:23               ` Christopher Dimech [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

  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=trinity-0136f41c-734d-43f3-913e-ed4dbdc6001b-1666128207112@3c-app-mailcom-bs10 \
    --to=dimech@gmx.com \
    --cc=drew.adams@oracle.com \
    --cc=heimeborgia@protonmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=incal@dataswamp.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).