[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
making a toolbar button globaly available
From: |
joakim |
Subject: |
making a toolbar button globaly available |
Date: |
Mon, 19 Jan 2009 18:13:14 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
I've tried these two aproaches, none seem to work.
Is it a bug or just me?
(define-minor-mode pocketcompletion-mode
"Toggle pocketcompletion mode"
;; The initial value.
:init-value nil
;; The indicator for the mode line.
:lighter " pocketcompletion"
;; The minor mode bindings.
:group 'pocketcompletion
:global t
:keymap
'(([tool-bar pocketcompletion] .
(menu-item "pocketcompletion" pocketcompletion
:image (image :type xpm :file "zoom-in.xpm"))))
(message "pocketcompletion minor body %s" pocketcompletion-mode)
;(pocketcompletion-enable-toolbar-button);2nd aproach, uncomment
; this and comment out :keymap
)
(defun pocketcompletion-enable-toolbar-button ()
(define-key global-map [tool-bar pocketcompletion]
'(menu-item "pocketcompletion" pocketcompletion
:image (image :type xpm :file "zoom-in.xpm")))
)
--
Joakim Verona
- making a toolbar button globaly available,
joakim <=