unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Using easy menu for mode-line lighter
@ 2023-07-10 22:27 uzibalqa
  0 siblings, 0 replies; only message in thread
From: uzibalqa @ 2023-07-10 22:27 UTC (permalink / raw)
  To: uzibalqa via Users list for the GNU Emacs text editor

I want to use easy-menu so that the mode-line lighter for a minor uses the following

(defun tika-easy-menu-do ()
  "Set up an easy menu for Tika."

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

;;--------

(defvar tika-kymap

  (let ( (pfmap (make-sparse-keymap)) )

    (keymap-set pfmap "H-b" #'outline-hide-body)
    (keymap-set pfmap "H-m" #'outline-hide-entry)
    (keymap-set pfmap "H-w" #'outline-show-entry)
    (keymap-set pfmap "H-v" #'outline-show-all)

    pfmap))




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

only message in thread, other threads:[~2023-07-10 22:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-10 22:27 Using easy menu for mode-line lighter 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).