diff options
author | Karl Heuer <kwzh@gnu.org> | 1997-09-30 07:20:58 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1997-09-30 07:20:58 +0000 |
commit | ba7fbe927374606cca81e946c75365e3aa4c86f7 (patch) | |
tree | 4dcbaa6c1f94be7b7786c7c62ce968a1c80dac2e /lisp/wid-edit.el | |
parent | 1a269256b20cff738d9207fb2fa845cbabed51bc (diff) | |
download | emacs-ba7fbe927374606cca81e946c75365e3aa4c86f7.tar.gz |
(widget-plist-member): Move from here to src/fns.c;
translated into C for efficiency.
(widget-put, widget-get, widget-apply): Likewise.
Diffstat (limited to 'lisp/wid-edit.el')
-rw-r--r-- | lisp/wid-edit.el | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index b2beb229b3b..9052c77deae 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -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 @@ This exists as a variable so it can be set locally in certain buffers.") ;; ;; 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 @@ new value." "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 @@ Otherwise, just return the value." (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 |