"In WIDGET, get the value of PROPERTY.
The value could either be specified when the widget was created, or
later with `widget-put'."
- (let (tmp)
- (catch 'found
- (while widget
- (cond ((and (setq tmp (plist-member (cdr widget) property))
- (consp tmp))
- (throw 'found (cadr tmp)))
- ((setq tmp (widget-type widget))
- (setq widget (get tmp 'widget-type)))
- (t
- (throw 'found nil)))))))
+ (let (value found)
+ (while (and widget (not found))
+ (if (setq found (plist-member (cdr widget) property))
+ (setq value (cadr found))
+ (setq widget (get (widget-type widget) 'widget-type))))
+ value))
(defun widget-get-indirect (widget property)
"In WIDGET, get the value of PROPERTY.