i have a problem to add a tool-bar button in emacs. I can run it with eval-buffer but not with my .emacs. When i add it with eval-buffer my button leave my toolbar after a scroll.
;;; Code:
(defun omar-hotel ()
"another nonce menu function"
(interactive)
(message "hotel, motel, holiday inn"))
(define-key-after global-map [tool-bar omar-button]
'(menu-item "Hotel" omar-hotel
:image (image :type xpm :file "/usr/share/emacs/23.4/etc/images/jump-to.xpm")
:help "OMG Omar!"
))
i also tried to add-hook like that but that's doesn't works.
(add-hook 'after-init-hook
(lambda ()
(define-key-after global-map [tool-bar omar-button]
'(menu-item "Hotel" omar-hotel
:image (image :type xpm :file "/usr/share/emacs/23.4/etc/images/jump-to.xpm")
:help "OMG Omar!"
))
))