[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Activating a minor-mode
From: |
angelomolina |
Subject: |
Re: Activating a minor-mode |
Date: |
Mon, 14 Mar 2022 20:20:47 +0100 (CET) |
I also want to activate the minor-mode globally. How could I activate a
minor-mode globally?
Mar 14, 2022, 18:13 by help-gnu-emacs@gnu.org:
> 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, 2022/03/14
- Message not available
- Re: Activating a minor-mode,
angelomolina <=
- 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
- Message not available
- RE: [External] : Re: Activating a minor-mode, angelomolina, 2022/03/14