71 |
;; :button-face-get :button-face :value-face :keymap :entry-from |
;; :button-face-get :button-face :value-face :keymap :entry-from |
72 |
;; :entry-to :help-echo :documentation-property :tab-order) |
;; :entry-to :help-echo :documentation-property :tab-order) |
73 |
|
|
74 |
|
(put 'define-widget 'doc-string-elt 3) ;`declare' doesn't work in functions. |
75 |
(defun define-widget (name class doc &rest args) |
(defun define-widget (name class doc &rest args) |
76 |
"Define a new widget type named NAME from CLASS. |
"Define a new widget type named NAME from CLASS. |
77 |
|
|
86 |
* (apply 'widget-create CLASS ARGS) |
* (apply 'widget-create CLASS ARGS) |
87 |
|
|
88 |
The third argument DOC is a documentation string for the widget." |
The third argument DOC is a documentation string for the widget." |
|
(declare (doc-string 3)) |
|
89 |
(put name 'widget-type (cons class args)) |
(put name 'widget-type (cons class args)) |
90 |
(put name 'widget-documentation doc) |
(put name 'widget-documentation doc) |
91 |
name) |
name) |