From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: Re: RE: [External] : About Package using a menu Date: Tue, 18 Oct 2022 23:23:27 +0200 Message-ID: References: <87czaqyr2j.fsf@dataswamp.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33900"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Heime , Emanuel Berg , "help-gnu-emacs@gnu.org" To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 18 23:26:33 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oku6b-0008dU-8n for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 18 Oct 2022 23:26:33 +0200 Original-Received: from localhost ([::1]:52172 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oku6W-0003vc-3N for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 18 Oct 2022 17:26:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44922) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oku3m-0003uB-FZ for help-gnu-emacs@gnu.org; Tue, 18 Oct 2022 17:23:39 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:44785) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oku3j-0006mA-9o for help-gnu-emacs@gnu.org; Tue, 18 Oct 2022 17:23:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1666128207; bh=Jx1wtag/QfwAqCnULXIrsz/1aTFic9L7bfDNOhotbjg=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=FHduGG1+L5XDXRGFhoLI/7hwZnjQg4aKeBf5ktV+CLiPxTDL1rWv9vLMpI+5YqMtm zTvEe0PwzPMHocPPQiBkr501VmRK2OBI0WzfNm0qi0/e5KAHQXVuRUmAFPfWnI/4e2 6Ko8uXyZEsgKXI+BvYUbohisJc5z0LUTo9fIzOFY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [92.251.127.164] ([92.251.127.164]) by web-mail.gmx.net (3c-app-mailcom-bs10.server.lan [172.19.170.178]) (via HTTP); Tue, 18 Oct 2022 23:23:27 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:xuHu4ucv922LIb9hGKseRBdpt06BoZueGWZCheKy6ppk720bkwRr9F0MD+WdwtuXLdRY4 K4aY9Tiq8ZzCfBMRRswaBGxzSUiaq+53emtrB2KV4loRuNc6tlYN+jsPjWcz1p8dVrU6bnYsJ/fa OwFgil9jbdoZtLcYI2n9Ia9PbV1hgSjDJ1wlBHxSC9lCuhPUCdeI2bQN81bGUJCxVGqVZoCjumhO cAq5whDpV7Ub6zs6gIHQGEvFCU08061JlkG7bpxdK/tE76rRpHlSgTwFjgJC2LZ0dUd7PpCsOBi6 8w= X-UI-Out-Filterresults: notjunk:1;V03:K0:NMgc18wBNtM=:SnX2cJznLR7B6s8a72aX9W b0bvoVXk1fr5CaxFH1hVv40GmLL2Vxfvda9CeYCYryihxR8/Rl6m6oo7oYtKNdPoFeHMiUl4Q SANgYfpeMDqxSAepyZTpajOcp4SJREwKC4Wk6iJ8n96Ai/UF2AvE8/LiSbdLWfrEVEZlaLEov iMm4uQpWxhZWejMt3rvsv/FkJbAVuOI+mn51rc7qXl98eAhfwNIyCMOXDeZUvlTD0OvTNFUX3 D8bN3flcW9f+uGk93/SLbGMDTc3L+XWVV7DjMpqnMV4Z4KK6sXPP9CRtWToz2HtqxwHyVb8hf 87SZvTDvRy0l2T2QD6NxM+LngwHJDwtw0xtYv1clYzRlv4oY5CsiJLM6W71Ou69ef01JSUpzZ ktkI7MzToz63A9frDSygey+iREbfq1pnlf1htIZKAhMqj3h15FGBFvaTj1i1MTILaN9kU+Tt7 fjwelZY84912BFGgZoI7QDDX+NWTh2QulGHEnkc8iTF5N5Y0o/61oqIRyoCKsWQxHb280Jvx+ YoYdVOYkgD45HJabH4EpN08mWP3n1S70xcuBvgEPjVCROoSHJ28TL6fqzzyeUesA9J2r0JlHb U7L1FGMoP9t+ekV0zNq/L+Qq40TENllip6tqPaS5E9IxQU1pj58kO56fiCzgx3vdFRbbRy1K8 hmPB6yqnfXV/FfzjDLXhFFFyreshKE4Y902/s+DZfTnPu+pc07je7yleIW5bRW8acySbrXy7u M00fJGBiv1oO7l2LKl/mZoj7aQAvvn3mE7IUk5o21Uir+bSzhWdjiTb7IC6YlWmjCmYbiKXL Received-SPF: pass client-ip=212.227.17.20; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:140140 Archived-At: > Sent: Wednesday, October 19, 2022 at 8:35 AM > From: "Drew Adams" > To: "Heime" > Cc: "Christopher Dimech" , "Emanuel Berg" , "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))