help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using a function hook to define an easy-menu


From: uzibalqa
Subject: Using a function hook to define an easy-menu
Date: Tue, 11 Jul 2023 11:08:55 +0000

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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]