all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Setting a minor-mode for outline-minor-mode
@ 2023-06-05 16:00 uzibalqa
  0 siblings, 0 replies; only message in thread
From: uzibalqa @ 2023-06-05 16:00 UTC (permalink / raw)
  To: uzibalqa via Users list for the GNU Emacs text editor


How can I define the following outline configuration so that when outline-minor-mode
is enabled, the following key binding are applied ?  The following is stored in a file named
taxocask-elisp.el.

(defun taxocask-elisp-view ()
  "Viewing emacs-lisp outline structures."
  (define-key emacs-lisp-mode-map (kbd "H-o s") #'outline-show-subtree)
  (define-key emacs-lisp-mode-map (kbd "H-o i") #'outline-show-children))

I want to have a minor-mode called taxocask-minor-mode defined in file taxocask.el.

(define-minor-mode taxocask-minor-mode
  "Enhances visibility of heading levels and text emphasis."
  :init-value nil
  :lighter " Taxocask"

  (if taxocask-minor-mode
      (taxocask-activate)

    ;; [ELSE] Rvert the functionality provided by minor mode
    (taxocask-deactivate)) )

;;;###autoload
(defun taxocask-enable ()
  "Enables `taxocask-minor-mode'."
  (taxocask-minor-mode 1))

;;;###autoload
(defun taxocask-disable ()
  "Disables `taxocask-minor-mode'."
  (taxocask-minor-mode 0))










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

only message in thread, other threads:[~2023-06-05 16:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-05 16:00 Setting a minor-mode for outline-minor-mode 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.