Mercurial > emacs
comparison lisp/wid-edit.el @ 22004:79a3c4eba19f
(widgets: sexp, variable, list, vector): Doc fixes.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 09 May 1998 07:12:14 +0000 |
parents | 28157e58238a |
children | b23a720f3b4f |
comparison
equal
deleted
inserted
replaced
22003:ea83fc4c4f77 | 22004:79a3c4eba19f |
---|---|
3057 (defvar widget-variable-prompt-value-history nil | 3057 (defvar widget-variable-prompt-value-history nil |
3058 "History of input to `widget-variable-prompt-value'.") | 3058 "History of input to `widget-variable-prompt-value'.") |
3059 | 3059 |
3060 (define-widget 'variable 'symbol | 3060 (define-widget 'variable 'symbol |
3061 ;; Should complete on variables. | 3061 ;; Should complete on variables. |
3062 "A lisp variable." | 3062 "A Lisp variable." |
3063 :prompt-match 'boundp | 3063 :prompt-match 'boundp |
3064 :prompt-history 'widget-variable-prompt-value-history | 3064 :prompt-history 'widget-variable-prompt-value-history |
3065 :tag "Variable") | 3065 :tag "Variable") |
3066 | 3066 |
3067 (when (featurep 'mule) | 3067 (when (featurep 'mule) |
3098 (widget-apply widget :notify widget event) | 3098 (widget-apply widget :notify widget event) |
3099 (widget-setup))) | 3099 (widget-setup))) |
3100 ) | 3100 ) |
3101 | 3101 |
3102 (define-widget 'sexp 'editable-field | 3102 (define-widget 'sexp 'editable-field |
3103 "An arbitrary lisp expression." | 3103 "An arbitrary Lisp expression." |
3104 :tag "Lisp expression" | 3104 :tag "Lisp expression" |
3105 :format "%{%t%}: %v" | 3105 :format "%{%t%}: %v" |
3106 :value nil | 3106 :value nil |
3107 :validate 'widget-sexp-validate | 3107 :validate 'widget-sexp-validate |
3108 :match (lambda (widget value) t) | 3108 :match (lambda (widget value) t) |
3221 (if (fboundp 'characterp) | 3221 (if (fboundp 'characterp) |
3222 (characterp value) | 3222 (characterp value) |
3223 (integerp value)))) | 3223 (integerp value)))) |
3224 | 3224 |
3225 (define-widget 'list 'group | 3225 (define-widget 'list 'group |
3226 "A lisp list." | 3226 "A Lisp list." |
3227 :tag "List" | 3227 :tag "List" |
3228 :format "%{%t%}:\n%v") | 3228 :format "%{%t%}:\n%v") |
3229 | 3229 |
3230 (define-widget 'vector 'group | 3230 (define-widget 'vector 'group |
3231 "A lisp vector." | 3231 "A Lisp vector." |
3232 :tag "Vector" | 3232 :tag "Vector" |
3233 :format "%{%t%}:\n%v" | 3233 :format "%{%t%}:\n%v" |
3234 :match 'widget-vector-match | 3234 :match 'widget-vector-match |
3235 :value-to-internal (lambda (widget value) (append value nil)) | 3235 :value-to-internal (lambda (widget value) (append value nil)) |
3236 :value-to-external (lambda (widget value) (apply 'vector value))) | 3236 :value-to-external (lambda (widget value) (apply 'vector value))) |