all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Testing menu and keymap
@ 2023-07-10 10:35 uzibalqa
  2023-07-10 14:33 ` [External] : " Drew Adams
  0 siblings, 1 reply; 4+ messages in thread
From: uzibalqa @ 2023-07-10 10:35 UTC (permalink / raw)
  To: uzibalqa via Users list for the GNU Emacs text editor

I am making a menu and associated keymap but have few ideas on how to test this.



(defvar tika-kymap
  (let ( (pfmap (make-sparse-keymap)) )
    (keymap-set pfmap "H-b" #'outline-hide-body)
    pfmap))

;; --------

(defvar tika-menuitm-kymap
  (let ((menuitm-kymap (make-sparse-keymap)))

    (define-key menuitm-kymap [hide]
                (cons "Hide" (make-sparse-keymap "Hide")))

    (define-key menuitm-kymap [hide body]
                '(menu-item "Hide Body" outline-hide-body
                            :help "Hide bodies, visible headings"))

    menuitm-kymap))

;; --------

(defvar tika-menubar-kymap

  (let ((menubar-kymap (make-sparse-keymap)))

    (define-key menubar-kymap [tematika]
      (cons "Outl"
            (nconc (make-sparse-keymap "Outl Menu")
                   (apply #'append
                          (mapcar (lambda (x) (if (consp x) (cdr x)))
                                  tika-menuitm-kymap)))))





^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [External] : Testing menu and keymap
  2023-07-10 10:35 Testing menu and keymap uzibalqa
@ 2023-07-10 14:33 ` Drew Adams
  2023-07-10 14:57   ` uzibalqa
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2023-07-10 14:33 UTC (permalink / raw)
  To: uzibalqa, 'Help-Gnu-Emacs (help-gnu-emacs@gnu.org)'

[-- Attachment #1: Type: text/plain, Size: 154 bytes --]

https://emacs.stackexchange.com/q/77929

Still no attempt to reduce the question and code to what's pertinent.  Just a verbatim copy (even the title).

[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 12609 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [External] : Testing menu and keymap
  2023-07-10 14:33 ` [External] : " Drew Adams
@ 2023-07-10 14:57   ` uzibalqa
  2023-07-10 20:34     ` uzibalqa
  0 siblings, 1 reply; 4+ messages in thread
From: uzibalqa @ 2023-07-10 14:57 UTC (permalink / raw)
  To: Drew Adams; +Cc: 'Help-Gnu-Emacs (help-gnu-emacs@gnu.org)'

------- Original Message -------
On Tuesday, July 11th, 2023 at 2:33 AM, Drew Adams <drew.adams@oracle.com> wrote:


> https://emacs.stackexchange.com/q/77929
> 
> Still no attempt to reduce the question and code to what's pertinent. Just a verbatim copy (even the title).

When somebody in drowning, it's useless barking orders !



^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [External] : Testing menu and keymap
  2023-07-10 14:57   ` uzibalqa
@ 2023-07-10 20:34     ` uzibalqa
  0 siblings, 0 replies; 4+ messages in thread
From: uzibalqa @ 2023-07-10 20:34 UTC (permalink / raw)
  To: uzibalqa; +Cc: Drew Adams, 'Help-Gnu-Emacs (help-gnu-emacs@gnu.org)'


------- Original Message -------
On Tuesday, July 11th, 2023 at 2:57 AM, uzibalqa <uzibalqa@proton.me> wrote:


> ------- Original Message -------
> On Tuesday, July 11th, 2023 at 2:33 AM, Drew Adams drew.adams@oracle.com wrote:
> 
> 
> 
> > https://emacs.stackexchange.com/q/77929
> > 
> > Still no attempt to reduce the question and code to what's pertinent. Just a verbatim copy (even the title).
> 
> 
> When somebody in drowning, it's useless barking orders !

It seems to me that I need to use :keymap in the definition of my minor mode to activate the menu
in the mode-line.  Looking at outline-minor-mode, a define-keymap is used.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-10 20:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-10 10:35 Testing menu and keymap uzibalqa
2023-07-10 14:33 ` [External] : " Drew Adams
2023-07-10 14:57   ` uzibalqa
2023-07-10 20:34     ` uzibalqa

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.