* lisp/wid-edit.el (widget-get): Make faster.
This commit is contained in:
parent
932397ce52
commit
7b504f898d
1 changed files with 10 additions and 6 deletions
|
@ -633,12 +633,16 @@ The value can later be retrieved with `widget-get'."
|
|||
"In WIDGET, get the value of PROPERTY.
|
||||
The value could either be specified when the widget was created, or
|
||||
later with `widget-put'."
|
||||
(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))
|
||||
(let (value)
|
||||
(while (and widget
|
||||
(let ((found (plist-member (cdr widget) property)))
|
||||
(cond (found
|
||||
(setq value (cadr found))
|
||||
nil)
|
||||
(t
|
||||
(setq widget (get (widget-type widget) 'widget-type))
|
||||
t)))))
|
||||
value))
|
||||
|
||||
(defun widget-get-indirect (widget property)
|
||||
"In WIDGET, get the value of PROPERTY.
|
||||
|
|
Loading…
Add table
Reference in a new issue