- (if (overlayp button)
- (overlay-put button prop val)
- ;; Must be a text-property button.
- (put-text-property
- (or (previous-single-property-change (1+ button) 'button)
- (point-min))
- (or (next-single-property-change button 'button)
- (point-max))
- prop val)))
-
-(defsubst button-activate (button &optional use-mouse-action)
+ (cond ((overlayp button)
+ (overlay-put button prop val))
+ ((button--area-button-p button)
+ (setq button (button--area-button-string button))
+ (put-text-property 0 (length button) prop val button))
+ (t ; Must be a text-property button.
+ (put-text-property
+ (or (previous-single-property-change (1+ button) 'button)
+ (point-min))
+ (or (next-single-property-change button 'button)
+ (point-max))
+ prop val))))
+
+(defun button-activate (button &optional use-mouse-action)