[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Activating a minor-mode
From: |
angelomolina |
Subject: |
Activating a minor-mode |
Date: |
Mon, 14 Mar 2022 19:13:58 +0100 (CET) |
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) ))
- Activating a minor-mode,
angelomolina <=
- Message not available
- Re: Activating a minor-mode, angelomolina, 2022/03/14
- RE: [External] : Re: Activating a minor-mode, Drew Adams, 2022/03/14
- Re: [External] : Re: Activating a minor-mode, tomas, 2022/03/15
- Re: [External] : Re: Activating a minor-mode, Eli Zaretskii, 2022/03/15
- Re: [External] : Re: Activating a minor-mode, tomas, 2022/03/15
- RE: [External] : Re: Activating a minor-mode, Drew Adams, 2022/03/15
- Re: [External] : Re: Activating a minor-mode, Eli Zaretskii, 2022/03/15
- Re: [External] : Re: Activating a minor-mode, Robert Pluim, 2022/03/15
- RE: [External] : Re: Activating a minor-mode, Drew Adams, 2022/03/15
- Re: [External] : Re: Activating a minor-mode, tomas, 2022/03/15