all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Activating a minor-mode
@ 2022-03-14 18:13 angelomolina--- via Users list for the GNU Emacs text editor
       [not found] ` <My8ckXL--3-2@tutanota.com-My8dEhi----2>
  0 siblings, 1 reply; 13+ messages in thread
From: angelomolina--- via Users list for the GNU Emacs text editor @ 2022-03-14 18:13 UTC (permalink / raw)
  To: Help Gnu Emacs

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)  ))



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-03-15 20:22 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-14 18:13 Activating a minor-mode angelomolina--- via Users list for the GNU Emacs text editor
     [not found] ` <My8ckXL--3-2@tutanota.com-My8dEhi----2>
2022-03-14 19:20   ` 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

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.