[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RE: [External] : About Package using a menu
From: |
Christopher Dimech |
Subject: |
Re: RE: [External] : About Package using a menu |
Date: |
Tue, 18 Oct 2022 23:23:27 +0200 |
> 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))
- RE: [External] : Re: About Package using a menu, (continued)
- RE: [External] : Re: About Package using a menu, Heime, 2022/10/18
- RE: [External] : Re: About Package using a menu, Heime, 2022/10/18
- Re: [External] : Re: About Package using a menu, Jean Louis, 2022/10/19
- Re: [External] : Re: About Package using a menu, Emanuel Berg, 2022/10/19
- Re: [External] : Re: About Package using a menu, Heime, 2022/10/19
- Re: [External] : Re: About Package using a menu, Emanuel Berg, 2022/10/20
- RE: [External] : Re: About Package using a menu, Drew Adams, 2022/10/18
- RE: [External] : Re: About Package using a menu, Heime, 2022/10/18
- RE: [External] : Re: About Package using a menu, Drew Adams, 2022/10/18
- RE: [External] : Re: About Package using a menu, Heime, 2022/10/18
- Re: RE: [External] : About Package using a menu,
Christopher Dimech <=