From: angelomolina--- via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: Help Gnu Emacs <help-gnu-emacs@gnu.org>
Subject: Activating a minor-mode
Date: Mon, 14 Mar 2022 19:13:58 +0100 (CET) [thread overview]
Message-ID: <My8ckXL--3-2@tutanota.com> (raw)
Have a minor mode with the following code. I want to enable `F11` to execute `voyager-sweep`.
But having difficulty get the minor mode to function. Would I need an `add-hook` ?
Have added the following
(defun typex-toro-voyager ()
"Launches toro voyager."
(add-to-list 'load-path "~/Opstk/bin/arktika")
(require 'toro "toro-voyager"))
(typex-toromona-voyager)
Here is the relevant code that defines the minor-mode.
(defun voyager-keytrigger ()
"Set keybinding for changing mode"
(global-unset-key [f11])
(global-set-key (kbd "<f11>") 'voyager-sweep) )
;;;###autoload
(define-minor-mode toro-minor-mode
"todo"
:lighter " toro" ; indicator in mode-line
(set-face-attribute 'font-lock-comment-face nil
:weight (face-attribute 'default :weight))
(when toro-minor-mode ; evaluates true when mode enabled
(set-face-attribute 'default nil :weight 'bold)
(toro-voyager-keytrigger) ))
next reply other threads:[~2022-03-14 18:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-14 18:13 angelomolina--- via Users list for the GNU Emacs text editor [this message]
[not found] ` <My8ckXL--3-2@tutanota.com-My8dEhi----2>
2022-03-14 19:20 ` Activating a minor-mode angelomolina--- via Users list for the GNU Emacs text editor
2022-03-14 21:55 ` [External] : " Drew Adams
2022-03-15 6:28 ` tomas
2022-03-15 14:08 ` Eli Zaretskii
2022-03-15 15:35 ` tomas
2022-03-15 16:05 ` Drew Adams
2022-03-15 16:56 ` Eli Zaretskii
2022-03-15 17:11 ` Robert Pluim
2022-03-15 19:49 ` Drew Adams
2022-03-15 20:22 ` tomas
[not found] ` <SJ0PR10MB5488471EF6654E78C062A2D5F30F9@SJ0PR10MB5488.namprd10.prod.outlook.com-My9Qgei--7-2>
2022-03-14 22:15 ` angelomolina--- via Users list for the GNU Emacs text editor
2022-03-14 23:29 ` Drew Adams
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=My8ckXL--3-2@tutanota.com \
--to=help-gnu-emacs@gnu.org \
--cc=angelomolina@tutanota.com \
/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.
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).