(global-set-key [<tool-bar> <kill-buffer>] 'd-kill-buffer)
This doesn't work as after executing this command, the mouse clicks
are still bound to kill-this-buffer, which I don't want. Would
someone be able to help me with the solution to this problem?
Sorry for wasting your time but I finally got it to work using the
following code:
(define-key
global-map
[tool-bar kill-buffer]
'(menu-item
"Maybe Kill Buffer"
d-kill-buffer
:enable 1
:visible 1
:help "Maybe Kill Buffer"
:image (image :type xpm :file "../etc/images/close.xpm")
))