-is non-nil, ACTION will be called with one argument, USER-DATA."
- (vector 'gui-button
- (if (featurep 'xpm)
- (xpm-button-create
- string gui-button-shadow-thickness
- (color-instance-name (face-foreground-instance 'gui-button-face))
- (color-instance-name (face-background-instance 'gui-button-face)))
- (xbm-button-create string gui-button-shadow-thickness))
- action user-data))
+is non-nil, ACTION will be called with one argument, USER-DATA.
+When ACTION is called, the buffer containing the button is made current."
+ (vector 'button
+ :descriptor string
+ :face 'gui-button-face
+ :callback-ex `(lambda (image-instance event)
+ (gui-button-action image-instance
+ (quote ,action)
+ (quote ,user-data)))))