Mercurial > emacs
changeset 20006:d24580b94fb3
(widget-plist-member): Move from here to src/fns.c;
translated into C for efficiency.
(widget-put, widget-get, widget-apply): Likewise.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Tue, 30 Sep 1997 07:20:58 +0000 |
parents | 148cbe18165c |
children | ba88cbeab176 |
files | lisp/wid-edit.el |
diffstat | 1 files changed, 0 insertions(+), 43 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/wid-edit.el Tue Sep 30 07:17:32 1997 +0000 +++ b/lisp/wid-edit.el Tue Sep 30 07:20:58 1997 +0000 @@ -59,11 +59,6 @@ 'next-event 'read-event)) - ;; The following should go away when bundled with Emacs. - (condition-case () - (require 'custom) - (error nil)) - (unless (and (featurep 'custom) (fboundp 'custom-declare-variable)) ;; We have the old custom-library, hack around it! (defmacro defgroup (&rest args) nil) @@ -189,17 +184,6 @@ ;; ;; These are not really widget specific. -(defsubst widget-plist-member (plist prop) - ;; Return non-nil if PLIST has the property PROP. - ;; PLIST is a property list, which is a list of the form - ;; (PROP1 VALUE1 PROP2 VALUE2 ...). PROP is a symbol. - ;; Unlike `plist-get', this allows you to distinguish between a missing - ;; property and a property with the value nil. - ;; The value is actually the tail of PLIST whose car is PROP. - (while (and plist (not (eq (car plist) prop))) - (setq plist (cdr (cdr plist)))) - plist) - (defun widget-princ-to-string (object) ;; Return string representation of OBJECT, any Lisp object. ;; No quoting characters are used; no delimiters are printed around @@ -487,27 +471,6 @@ "Return the type of WIDGET, a symbol." (car widget)) -(defun widget-put (widget property value) - "In WIDGET set PROPERTY to VALUE. -The value can later be retrived with `widget-get'." - (setcdr widget (plist-put (cdr widget) property value))) - -(defun widget-get (widget property) - "In WIDGET, get the value of PROPERTY. -The value could either be specified when the widget was created, or -later with `widget-put'." - (let ((missing t) - value tmp) - (while missing - (cond ((setq tmp (widget-plist-member (cdr widget) property)) - (setq value (car (cdr tmp)) - missing nil)) - ((setq tmp (car widget)) - (setq widget (get tmp 'widget-type))) - (t - (setq missing nil)))) - value)) - (defun widget-get-indirect (widget property) "In WIDGET, get the value of PROPERTY. If the value is a symbol, return its binding. @@ -525,12 +488,6 @@ (widget-member (get (car widget) 'widget-type) property)) (t nil))) -;;;###autoload -(defun widget-apply (widget property &rest args) - "Apply the value of WIDGET's PROPERTY to the widget itself. -ARGS are passed as extra arguments to the function." - (apply (widget-get widget property) widget args)) - (defun widget-value (widget) "Extract the current value of WIDGET." (widget-apply widget