3116 |
(interactive) |
(interactive) |
3117 |
(lisp-complete-symbol 'boundp)) |
(lisp-complete-symbol 'boundp)) |
3118 |
:tag "Variable") |
:tag "Variable") |
3119 |
|
|
3120 |
(defvar widget-coding-system-prompt-value-history nil |
(defvar widget-coding-system-prompt-value-history nil |
3121 |
"History of input to `widget-coding-system-prompt-value'.") |
"History of input to `widget-coding-system-prompt-value'.") |
3122 |
|
|
3159 |
(widget-apply widget :notify widget event) |
(widget-apply widget :notify widget event) |
3160 |
(widget-setup))) |
(widget-setup))) |
3161 |
|
|
3162 |
|
(defvar widget-key-sequence-prompt-value-history nil |
3163 |
|
"History of input to `widget-key-sequence-prompt-value'.") |
3164 |
|
|
3165 |
|
;; This mostly works, but I am pretty sure it needs more change |
3166 |
|
;; to be 100% correct. I don't know what the change should be -- rms. |
3167 |
|
|
3168 |
|
(define-widget 'key-sequence 'restricted-sexp |
3169 |
|
"A Lisp function." |
3170 |
|
:prompt-value 'widget-field-prompt-value |
3171 |
|
:prompt-internal 'widget-symbol-prompt-internal |
3172 |
|
:prompt-match 'fboundp |
3173 |
|
:prompt-history 'widget-key-sequence-prompt-value-history |
3174 |
|
:action 'widget-field-action |
3175 |
|
:match-alternatives '(stringp vectorp) |
3176 |
|
:validate (lambda (widget) |
3177 |
|
(unless (or (stringp (widget-value widget)) |
3178 |
|
(vectorp (widget-value widget))) |
3179 |
|
(widget-put widget :error (format "Invalid key sequence: %S" |
3180 |
|
(widget-value widget))) |
3181 |
|
widget)) |
3182 |
|
:value 'ignore |
3183 |
|
:tag "Key sequence") |
3184 |
|
|
3185 |
(define-widget 'sexp 'editable-field |
(define-widget 'sexp 'editable-field |
3186 |
"An arbitrary Lisp expression." |
"An arbitrary Lisp expression." |
3187 |
:tag "Lisp expression" |
:tag "Lisp expression" |