* Minor mode menu does not show up
@ 2023-07-09 15:09 uzibalqa
0 siblings, 0 replies; only message in thread
From: uzibalqa @ 2023-07-09 15:09 UTC (permalink / raw)
To: uzibalqa via Users list for the GNU Emacs text editor
I am constructing a menu for a minor mode with the following code.
But I cannot get the menu to show up.
(defvar tika-menuitm-kmap
(let ((menuitm-kmap (make-sparse-keymap)))
(define-key menuitm-kmap [hide]
(cons "Hide" (make-sparse-keymap "Hide")))
(define-key menuitm-kmap [hide outl-hide-body]
'(menu-item "Hide Body" outline-hide-body
:help "Hide bodies, visible headings"))
(define-key menuitm-kmap [hide space]
'(menu-item "--space"))
menuitm-kmap))
;;--------
(defvar tika-menubar-kmap
(let ((menubar-kmap (make-sparse-keymap)))
(define-key menubar-kmap [tika]
(cons "Outl"
(nconc (make-sparse-keymap "Outl Menu")
(apply #'append
(mapcar (lambda (x) (if (consp x) (cdr x)))
tika-menuitm-kmap)))))
menubar-kmap))
;;--------
(define-minor-mode tika-minor-mode
:init-value nil
:lighter " Tika"
:keymap (define-keymap
:suppress "<menu-bar>"
:name tematika-menubar-kmap)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-07-09 15:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-09 15:09 Minor mode menu does not show up uzibalqa
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).