all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Using a function hook to define an easy-menu
@ 2023-07-11 11:08 uzibalqa
  0 siblings, 0 replies; only message in thread
From: uzibalqa @ 2023-07-11 11:08 UTC (permalink / raw)
  To: uzibalqa via Users list for the GNU Emacs text editor

Is it acceptable to use a function to define an easy-menu, then use 
a hook to bind it to the minor mode ?

(defun tika-ezmenu-popup ()
  (easy-menu-define tika-ezmenu tika-kymap "Tika Menu"
    '("Tika Ezm"
        ["Hide Body"  outline-hide-body  t]
        ["Hide Entry" outline-hide-entry t]
        "---"
        ["Show Entry" outline-show-entry t]
        ["Show All"   outline-show-all   t])))


(add-hook 'tika-minor-mode-hook #'tika-ezmenu-popup)



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-11 11:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-11 11:08 Using a function hook to define an easy-menu 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.