From: uzibalqa <uzibalqa@proton.me>
To: uzibalqa via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org>
Subject: Setting a minor-mode for outline-minor-mode
Date: Mon, 05 Jun 2023 16:00:23 +0000 [thread overview]
Message-ID: <o7zAU97zEGNq42bmhdPnwtNKwOTH_WxdS4yRiEXL5qKDTlwFByWrbKU2x-wL0avazgZGT1Zvcg8w8uXUAHLoU3xT1et4xnBJJZwDw9mGK7k=@proton.me> (raw)
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))
reply other threads:[~2023-06-05 16:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='o7zAU97zEGNq42bmhdPnwtNKwOTH_WxdS4yRiEXL5qKDTlwFByWrbKU2x-wL0avazgZGT1Zvcg8w8uXUAHLoU3xT1et4xnBJJZwDw9mGK7k=@proton.me' \
--to=uzibalqa@proton.me \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.