unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How do I make an "always available" tool-bar button?
@ 2009-01-19 12:39 joakim
  0 siblings, 0 replies; only message in thread
From: joakim @ 2009-01-19 12:39 UTC (permalink / raw)
  To: help-gnu-emacs

I want to have a button available in the emacs tool-bar at all times.

I tried something like the code below but it doesnt work.

Any hints?


(defun pocketcompletion-enable-toolbar-button ()
  (define-key global-map [tool-bar pocketcompletion]
   '(menu-item "pocketcompletion" pocketcompletion
               :image (image :type xpm :file "zoom-in.xpm")))
  )


(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
      (message "pocketcompletion minor body %s" pocketcompletion-mode)
      (pocketcompletion-enable-toolbar-button))

      
-- 
Joakim Verona





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-01-19 12:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-19 12:39 How do I make an "always available" tool-bar button? joakim

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