Remove string.h hack.
[bpt/emacs.git] / man / widget.texi
CommitLineData
6bf7aab6
DL
1\input texinfo.tex
2
3@c %**start of header
4@setfilename ../info/widget
5@settitle The Emacs Widget Library
6@iftex
7@afourpaper
8@headings double
9@end iftex
10@c %**end of header
11
12@dircategory Editors
13@direntry
14* Widget: (widget). Documenting the "widget" package used by the
15 Emacs Custom facility.
16@end direntry
17
18@node Top, Introduction, (dir), (dir)
19@comment node-name, next, previous, up
20@top The Emacs Widget Library
21
6bf7aab6
DL
22@menu
23* Introduction::
24* User Interface::
25* Programming Example::
26* Setting Up the Buffer::
27* Basic Types::
28* Sexp Types::
29* Widget Properties::
30* Defining New Widgets::
31* Widget Browser::
32* Widget Minor Mode::
33* Utilities::
34* Widget Wishlist::
35@end menu
36
37@node Introduction, User Interface, Top, Top
38@comment node-name, next, previous, up
39@section Introduction
40
41Most graphical user interface toolkits, such as Motif and XView, provide
42a number of standard user interface controls (sometimes known as
43`widgets' or `gadgets'). Emacs doesn't really support anything like
44this, except for an incredible powerful text ``widget''. On the other
45hand, Emacs does provide the necessary primitives to implement many
46other widgets within a text buffer. The @code{widget} package
47simplifies this task.
48
49The basic widgets are:
50
51@table @code
52@item link
53Areas of text with an associated action. Intended for hypertext links
54embedded in text.
55@item push-button
56Like link, but intended for stand-alone buttons.
57@item editable-field
58An editable text field. It can be either variable or fixed length.
59@item menu-choice
60Allows the user to choose one of multiple options from a menu, each
61option is itself a widget. Only the selected option will be visible in
62the buffer.
63@item radio-button-choice
64Allows the user to choose one of multiple options by activating radio
65buttons. The options are implemented as widgets. All options will be
66visible in the buffer.
67@item item
68A simple constant widget intended to be used in the @code{menu-choice} and
69@code{radio-button-choice} widgets.
70@item choice-item
71An button item only intended for use in choices. When invoked, the user
72will be asked to select another option from the choice widget.
73@item toggle
74A simple @samp{on}/@samp{off} switch.
75@item checkbox
76A checkbox (@samp{[ ]}/@samp{[X]}).
77@item editable-list
78Create an editable list. The user can insert or delete items in the
79list. Each list item is itself a widget.
80@end table
81
82Now of what possible use can support for widgets be in a text editor?
83I'm glad you asked. The answer is that widgets are useful for
84implementing forms. A @dfn{form} in Emacs is a buffer where the user is
85supposed to fill out a number of fields, each of which has a specific
86meaning. The user is not supposed to change or delete any of the text
87between the fields. Examples of forms in Emacs are the @file{forms}
88package (of course), the customize buffers, the mail and news compose
89modes, and the @sc{html} form support in the @file{w3} browser.
90
91The advantages for a programmer of using the @code{widget} package to
92implement forms are:
93
94@enumerate
95@item
96More complex field than just editable text are supported.
97@item
98You can give the user immediate feedback if he enters invalid data in a
99text field, and sometimes prevent entering invalid data.
100@item
101You can have fixed sized fields, thus allowing multiple field to be
102lined up in columns.
103@item
104It is simple to query or set the value of a field.
105@item
106Editing happens in buffer, not in the mini-buffer.
107@item
108Packages using the library get a uniform look, making them easier for
109the user to learn.
110@item
111As support for embedded graphics improve, the widget library will
112extended to support it. This means that your code using the widget
113library will also use the new graphic features by automatic.
114@end enumerate
115
116In order to minimize the code that is loaded by users who does not
117create any widgets, the code has been split in two files:
118
119@table @file
120@item widget.el
121This will declare the user variables, define the function
122@code{widget-define}, and autoload the function @code{widget-create}.
123@item wid-edit.el
124Everything else is here, there is no reason to load it explicitly, as
125it will be autoloaded when needed.
126@end table
127
128@node User Interface, Programming Example, Introduction, Top
129@comment node-name, next, previous, up
130@section User Interface
131
132A form consist of read only text for documentation and some fields,
133where each the fields contain two parts, as tag and a value. The tags
134are used to identify the fields, so the documentation can refer to the
135foo field, meaning the field tagged with @samp{Foo}. Here is an example
136form:
137
138@example
139Here is some documentation.
140
141Name: @i{My Name} @strong{Choose}: This option
142Address: @i{Some Place
143In some City
144Some country.}
145
146See also @b{_other work_} for more information.
147
148Numbers: count to three below
149@b{[INS]} @b{[DEL]} @i{One}
150@b{[INS]} @b{[DEL]} @i{Eh, two?}
151@b{[INS]} @b{[DEL]} @i{Five!}
152@b{[INS]}
153
154Select multiple:
155
156@b{[X]} This
157@b{[ ]} That
158@b{[X]} Thus
159
160Select one:
161
162@b{(*)} One
163@b{( )} Another One.
164@b{( )} A Final One.
165
166@b{[Apply Form]} @b{[Reset Form]}
167@end example
168
169The top level widgets in is example are tagged @samp{Name},
170@samp{Choose}, @samp{Address}, @samp{_other work_}, @samp{Numbers},
171@samp{Select multiple}, @samp{Select one}, @samp{[Apply Form]}, and
172@samp{[Reset Form]}. There are basically two thing the user can do within
173a form, namely editing the editable text fields and activating the
174buttons.
175
176@subsection Editable Text Fields
177
178In the example, the value for the @samp{Name} is most likely displayed
179in an editable text field, and so are values for each of the members of
180the @samp{Numbers} list. All the normal Emacs editing operations are
181available for editing these fields. The only restriction is that each
182change you make must be contained within a single editable text field.
183For example, capitalizing all text from the middle of one field to the
184middle of another field is prohibited.
185
186Editing text fields are created by the @code{editable-field} widget.
187
188The editing text fields are highlighted with the
189@code{widget-field-face} face, making them easy to find.
190
191@deffn Face widget-field-face
192Face used for other editing fields.
193@end deffn
194
195@subsection Buttons
196
197Some portions of the buffer have an associated @dfn{action}, which can
198be @dfn{invoked} by a standard key or mouse command. These portions
199are called @dfn{buttons}. The default commands for activating a button
200are:
201
202@table @kbd
203@item @key{RET}
204@deffn Command widget-button-press @var{pos} &optional @var{event}
205Invoke the button at @var{pos}, defaulting to point.
206If point is not located on a button, invoke the binding in
207@code{widget-global-map} (by default the global map).
208@end deffn
209
210@item mouse-2
211@deffn Command widget-button-click @var{event}
212Invoke the button at the location of the mouse pointer. If the mouse
213pointer is located in an editable text field, invoke the binding in
214@code{widget-global-map} (by default the global map).
215@end deffn
216@end table
217
218There are several different kind of buttons, all of which are present in
219the example:
220
221@table @emph
222@item The Option Field Tags.
223When you invoke one of these buttons, you will be asked to choose
224between a number of different options. This is how you edit an option
225field. Option fields are created by the @code{menu-choice} widget. In
226the example, @samp{@b{Choose}} is an option field tag.
227@item The @samp{@b{[INS]}} and @samp{@b{[DEL]}} buttons.
228Activating these will insert or delete elements from a editable list.
229The list is created by the @code{editable-list} widget.
230@item Embedded Buttons.
231The @samp{@b{_other work_}} is an example of an embedded
232button. Embedded buttons are not associated with a fields, but can serve
233any purpose, such as implementing hypertext references. They are
234usually created by the @code{link} widget.
235@item The @samp{@b{[ ]}} and @samp{@b{[X]}} buttons.
236Activating one of these will convert it to the other. This is useful
237for implementing multiple-choice fields. You can create it wit
238@item The @samp{@b{( )}} and @samp{@b{(*)}} buttons.
239Only one radio button in a @code{radio-button-choice} widget can be
240selected at any time. When you invoke one of the unselected radio
241buttons, it will be selected and the previous selected radio button will
242become unselected.
243@item The @samp{@b{[Apply Form]}} @samp{@b{[Reset Form]}} buttons.
244These are explicit buttons made with the @code{push-button} widget. The main
245difference from the @code{link} widget is that the buttons are will be
246displayed as GUI buttons when possible.
247enough.
248@end table
249
250To make them easier to locate, buttons are emphasized in the buffer.
251
252@deffn Face widget-button-face
253Face used for buttons.
254@end deffn
255
256@defopt widget-mouse-face
257Face used for buttons when the mouse pointer is above it.
258@end defopt
259
260@subsection Navigation
261
262You can use all the normal Emacs commands to move around in a form
263buffer, plus you will have these additional commands:
264
265@table @kbd
266@item @key{TAB}
267@deffn Command widget-forward &optional count
268Move point @var{count} buttons or editing fields forward.
269@end deffn
270@item @key{M-TAB}
271@deffn Command widget-backward &optional count
272Move point @var{count} buttons or editing fields backward.
273@end deffn
274@end table
275
276@node Programming Example, Setting Up the Buffer, User Interface, Top
277@comment node-name, next, previous, up
278@section Programming Example
279
280Here is the code to implement the user interface example (@pxref{User
281Interface}).
282
283@lisp
284(require 'widget)
285
286(eval-when-compile
287 (require 'wid-edit))
288
289(defvar widget-example-repeat)
290
291(defun widget-example ()
292 "Create the widgets from the Widget manual."
293 (interactive)
294 (switch-to-buffer "*Widget Example*")
295 (kill-all-local-variables)
296 (make-local-variable 'widget-example-repeat)
297 (let ((inhibit-read-only t))
298 (erase-buffer))
299 (widget-insert "Here is some documentation.\n\nName: ")
300 (widget-create 'editable-field
301 :size 13
302 "My Name")
303 (widget-create 'menu-choice
304 :tag "Choose"
305 :value "This"
306 :help-echo "Choose me, please!"
307 :notify (lambda (widget &rest ignore)
308 (message "%s is a good choice!"
309 (widget-value widget)))
310 '(item :tag "This option" :value "This")
311 '(choice-item "That option")
312 '(editable-field :menu-tag "No option" "Thus option"))
313 (widget-insert "Address: ")
314 (widget-create 'editable-field
315 "Some Place\nIn some City\nSome country.")
316 (widget-insert "\nSee also ")
317 (widget-create 'link
318 :notify (lambda (&rest ignore)
319 (widget-value-set widget-example-repeat
320 '("En" "To" "Tre"))
321 (widget-setup))
322 "other work")
323 (widget-insert " for more information.\n\nNumbers: count to three below\n")
324 (setq widget-example-repeat
325 (widget-create 'editable-list
326 :entry-format "%i %d %v"
327 :notify (lambda (widget &rest ignore)
328 (let ((old (widget-get widget
329 ':example-length))
330 (new (length (widget-value widget))))
331 (unless (eq old new)
332 (widget-put widget ':example-length new)
333 (message "You can count to %d." new))))
334 :value '("One" "Eh, two?" "Five!")
335 '(editable-field :value "three")))
336 (widget-insert "\n\nSelect multiple:\n\n")
337 (widget-create 'checkbox t)
338 (widget-insert " This\n")
339 (widget-create 'checkbox nil)
340 (widget-insert " That\n")
341 (widget-create 'checkbox
342 :notify (lambda (&rest ignore) (message "Tickle"))
343 t)
344 (widget-insert " Thus\n\nSelect one:\n\n")
345 (widget-create 'radio-button-choice
346 :value "One"
347 :notify (lambda (widget &rest ignore)
348 (message "You selected %s"
349 (widget-value widget)))
350 '(item "One") '(item "Another One.") '(item "A Final One."))
351 (widget-insert "\n")
352 (widget-create 'push-button
353 :notify (lambda (&rest ignore)
354 (if (= (length (widget-value widget-example-repeat))
355 3)
356 (message "Congratulation!")
357 (error "Three was the count!")))
358 "Apply Form")
359 (widget-insert " ")
360 (widget-create 'push-button
361 :notify (lambda (&rest ignore)
362 (widget-example))
363 "Reset Form")
364 (widget-insert "\n")
365 (use-local-map widget-keymap)
366 (widget-setup))
367@end lisp
368
369@node Setting Up the Buffer, Basic Types, Programming Example, Top
370@comment node-name, next, previous, up
371@section Setting Up the Buffer
372
373Widgets are created with @code{widget-create}, which returns a
374@dfn{widget} object. This object can be queried and manipulated by
375other widget functions, until it is deleted with @code{widget-delete}.
376After the widgets have been created, @code{widget-setup} must be called
377to enable them.
378
379@defun widget-create type [ keyword argument ]@dots{}
380Create and return a widget of type @var{type}.
381The syntax for the @var{type} argument is described in @ref{Basic Types}.
382
383The keyword arguments can be used to overwrite the keyword arguments
384that are part of @var{type}.
385@end defun
386
387@defun widget-delete widget
388Delete @var{widget} and remove it from the buffer.
389@end defun
390
391@defun widget-setup
392Setup a buffer to support widgets.
393
394This should be called after creating all the widgets and before allowing
395the user to edit them.
396@refill
397@end defun
398
399If you want to insert text outside the widgets in the form, the
400recommended way to do that is with @code{widget-insert}.
401
402@defun widget-insert
403Insert the arguments, either strings or characters, at point.
404The inserted text will be read only.
405@end defun
406
407There is a standard widget keymap which you might find useful.
408
409@defvr Const widget-keymap
410A keymap with the global keymap as its parent.@*
411@key{TAB} and @kbd{C-@key{TAB}} are bound to @code{widget-forward} and
412@code{widget-backward}, respectively. @kbd{@key{RET}} and @kbd{mouse-2}
413are bound to @code{widget-button-press} and
414@code{widget-button-}.@refill
415@end defvr
416
417@defvar widget-global-map
418Keymap used by @code{widget-button-press} and @code{widget-button-click}
419when not on a button. By default this is @code{global-map}.
420@end defvar
421
422@node Basic Types, Sexp Types, Setting Up the Buffer, Top
423@comment node-name, next, previous, up
424@section Basic Types
425
426The syntax of a type specification is given below:
427
428@example
429NAME ::= (NAME [KEYWORD ARGUMENT]... ARGS)
430 | NAME
431@end example
432
433Where, @var{name} is a widget name, @var{keyword} is the name of a
434property, @var{argument} is the value of the property, and @var{args}
435are interpreted in a widget specific way.
436
437There following keyword arguments that apply to all widgets:
438
439@table @code
440@item :value
441The initial value for widgets of this type.
442
443@item :format
444This string will be inserted in the buffer when you create a widget.
445The following @samp{%} escapes are available:
446
447@table @samp
448@item %[
449@itemx %]
450The text inside will be marked as a button.
451
452By default, the text will be shown in @code{widget-button-face}, and
453surrounded by brackets.
454
455@defopt widget-button-prefix
456String to prefix buttons.
457@end defopt
458
459@defopt widget-button-suffix
460String to suffix buttons.
461@end defopt
462
463@item %@{
464@itemx %@}
465The text inside will be displayed with the face specified by
466@code{:sample-face}.
467
468@item %v
54438eb5 469This will be replaced with the buffer representation of the widget's
6bf7aab6
DL
470value. What this is depends on the widget type.
471
472@item %d
473Insert the string specified by @code{:doc} here.
474
475@item %h
476Like @samp{%d}, with the following modifications: If the documentation
477string is more than one line, it will add a button which will toggle
478between showing only the first line, and showing the full text.
479Furthermore, if there is no @code{:doc} property in the widget, it will
480instead examine the @code{:documentation-property} property. If it is a
481lambda expression, it will be called with the widget's value as an
482argument, and the result will be used as the documentation text.
483
484@item %t
485Insert the string specified by @code{:tag} here, or the @code{princ}
486representation of the value if there is no tag.
487
488@item %%
489Insert a literal @samp{%}.
490@end table
491
492@item :button-face
493Face used to highlight text inside %[ %] in the format.
494
495@item :button-prefix
496@itemx :button-suffix
497
498Text around %[ %] in the format.
499
500These can be
501@table @emph
502@item nil
503No text is inserted.
504
505@item a string
506The string is inserted literally.
507
508@item a symbol
509The value of the symbol is expanded according to this table.
510@end table
511
512@item :doc
513The string inserted by the @samp{%d} escape in the format
514string.
515
516@item :tag
517The string inserted by the @samp{%t} escape in the format
518string.
519
520@item :tag-glyph
521Name of image to use instead of the string specified by `:tag' on
522Emacsen that supports it.
523
524@item :help-echo
525Message displayed whenever you move to the widget with either
526@code{widget-forward} or @code{widget-backward}.
527
528@item :indent
529An integer indicating the absolute number of spaces to indent children
530of this widget.
531
532@item :offset
533An integer indicating how many extra spaces to add to the widget's
534grandchildren compared to this widget.
535
536@item :extra-offset
537An integer indicating how many extra spaces to add to the widget's
538children compared to this widget.
539
540@item :notify
541A function called each time the widget or a nested widget is changed.
542The function is called with two or three arguments. The first argument
543is the widget itself, the second argument is the widget that was
544changed, and the third argument is the event leading to the change, if
545any.
546
547@item :menu-tag
548Tag used in the menu when the widget is used as an option in a
549@code{menu-choice} widget.
550
551@item :menu-tag-get
552Function used for finding the tag when the widget is used as an option
553in a @code{menu-choice} widget. By default, the tag used will be either the
554@code{:menu-tag} or @code{:tag} property if present, or the @code{princ}
555representation of the @code{:value} property if not.
556
557@item :match
558Should be a function called with two arguments, the widget and a value,
559and returning non-nil if the widget can represent the specified value.
560
561@item :validate
562A function which takes a widget as an argument, and return nil if the
54438eb5
DL
563widget's current value is valid for the widget. Otherwise it should
564return the widget containing the invalid data, and set that widget's
6bf7aab6
DL
565@code{:error} property to a string explaining the error.
566
567The following predefined function can be used:
568
569@defun widget-children-validate widget
570All the @code{:children} of @var{widget} must be valid.
571@end defun
572
573@item :tab-order
574Specify the order in which widgets are traversed with
575@code{widget-forward} or @code{widget-backward}. This is only partially
576implemented.
577
578@enumerate a
579@item
580Widgets with tabbing order @code{-1} are ignored.
581
582@item
583(Unimplemented) When on a widget with tabbing order @var{n}, go to the
584next widget in the buffer with tabbing order @var{n+1} or @code{nil},
585whichever comes first.
586
587@item
588When on a widget with no tabbing order specified, go to the next widget
589in the buffer with a positive tabbing order, or @code{nil}
590@end enumerate
591
592@item :parent
593The parent of a nested widget (e.g. a @code{menu-choice} item or an
594element of a @code{editable-list} widget).
595
596@item :sibling-args
597This keyword is only used for members of a @code{radio-button-choice} or
598@code{checklist}. The value should be a list of extra keyword
599arguments, which will be used when creating the @code{radio-button} or
600@code{checkbox} associated with this item.
601
602@end table
603
604@deffn {User Option} widget-glyph-directory
605Directory where glyphs are found.
606Widget will look here for a file with the same name as specified for the
607image, with either a @samp{.xpm} (if supported) or @samp{.xbm} extension.
608@end deffn
609
610@deffn{User Option} widget-glyph-enable
611If non-nil, allow glyphs to appear on displays where they are supported.
612@end deffn
613
614
615@menu
616* link::
617* url-link::
618* info-link::
619* push-button::
620* editable-field::
621* text::
622* menu-choice::
623* radio-button-choice::
624* item::
625* choice-item::
626* toggle::
627* checkbox::
628* checklist::
629* editable-list::
630* group::
631@end menu
632
633@node link, url-link, Basic Types, Basic Types
634@comment node-name, next, previous, up
635@subsection The @code{link} Widget
636
637Syntax:
638
639@example
640TYPE ::= (link [KEYWORD ARGUMENT]... [ VALUE ])
641@end example
642
643The @var{value}, if present, is used to initialize the @code{:value}
644property. The value should be a string, which will be inserted in the
645buffer.
646
647By default the link will be shown in brackets.
648
649@defopt widget-link-prefix
650String to prefix links.
651@end defopt
652
653@defopt widget-link-suffix
654String to suffix links.
655@end defopt
656
657@node url-link, info-link, link, Basic Types
658@comment node-name, next, previous, up
659@subsection The @code{url-link} Widget
660
661Syntax:
662
663@example
664TYPE ::= (url-link [KEYWORD ARGUMENT]... URL)
665@end example
666
667When this link is invoked, the @sc{www} browser specified by
668@code{browse-url-browser-function} will be called with @var{url}.
669
670@node info-link, push-button, url-link, Basic Types
671@comment node-name, next, previous, up
672@subsection The @code{info-link} Widget
673
674Syntax:
675
676@example
677TYPE ::= (info-link [KEYWORD ARGUMENT]... ADDRESS)
678@end example
679
54438eb5 680When this link is invoked, the built-in info browser is started on
6bf7aab6
DL
681@var{address}.
682
683@node push-button, editable-field, info-link, Basic Types
684@comment node-name, next, previous, up
685@subsection The @code{push-button} Widget
686
687Syntax:
688
689@example
690TYPE ::= (push-button [KEYWORD ARGUMENT]... [ VALUE ])
691@end example
692
693The @var{value}, if present, is used to initialize the @code{:value}
694property. The value should be a string, which will be inserted in the
695buffer.
696
697By default the tag will be shown in brackets.
698
699@defopt widget-push-button-prefix
700String to prefix push buttons.
701@end defopt
702
703@defopt widget-push-button-suffix
704String to suffix push buttons.
705@end defopt
706
707@node editable-field, text, push-button, Basic Types
708@comment node-name, next, previous, up
709@subsection The @code{editable-field} Widget
710
711Syntax:
712
713@example
714TYPE ::= (editable-field [KEYWORD ARGUMENT]... [ VALUE ])
715@end example
716
717The @var{value}, if present, is used to initialize the @code{:value}
718property. The value should be a string, which will be inserted in
719field. This widget will match all string values.
720
721The following extra properties are recognized.
722
723@table @code
724@item :size
725The width of the editable field.@*
726By default the field will reach to the end of the line.
727
728@item :value-face
729Face used for highlighting the editable field. Default is
730@code{widget-field-face}.
731
732@item :secret
733Character used to display the value. You can set this to e.g. @code{?*}
734if the field contains a password or other secret information. By
735default, the value is not secret.
736
737@item :valid-regexp
738By default the @code{:validate} function will match the content of the
739field with the value of this attribute. The default value is @code{""}
740which matches everything.
741
742@item :keymap
743Keymap used in the editable field. The default value is
744@code{widget-field-keymap}, which allows you to use all the normal
745editing commands, even if the buffers major mode suppress some of them.
746Pressing return invokes the function specified by @code{:action}.
747@end table
748
749@node text, menu-choice, editable-field, Basic Types
750@comment node-name, next, previous, up
751@subsection The @code{text} Widget
752
753This is just like @code{editable-field}, but intended for multiline text
754fields. The default @code{:keymap} is @code{widget-text-keymap}, which
755does not rebind the return key.
756
757@node menu-choice, radio-button-choice, text, Basic Types
758@comment node-name, next, previous, up
759@subsection The @code{menu-choice} Widget
760
761Syntax:
762
763@example
764TYPE ::= (menu-choice [KEYWORD ARGUMENT]... TYPE ... )
765@end example
766
54438eb5
DL
767The @var{type} argument represents each possible choice. The widget's
768value will be that of the chosen @var{type} argument. This widget will
769match any value matching at least one of the specified @var{type}
770arguments.
6bf7aab6
DL
771
772@table @code
773@item :void
774Widget type used as a fallback when the value does not match any of the
775specified @var{type} arguments.
776
777@item :case-fold
778Set this to nil if you don't want to ignore case when prompting for a
779choice through the minibuffer.
780
781@item :children
782A list whose car is the widget representing the currently chosen type in
783the buffer.
784
785@item :choice
786The current chosen type
787
788@item :args
789The list of types.
790@end table
791
792@node radio-button-choice, item, menu-choice, Basic Types
793@comment node-name, next, previous, up
794@subsection The @code{radio-button-choice} Widget
795
796Syntax:
797
798@example
799TYPE ::= (radio-button-choice [KEYWORD ARGUMENT]... TYPE ... )
800@end example
801
54438eb5
DL
802The @var{type} argument represents each possible choice. The widget's
803value will be that of the chosen @var{type} argument. This widget will
804match any value matching at least one of the specified @var{type}
805arguments.
6bf7aab6
DL
806
807The following extra properties are recognized.
808
809@table @code
810@item :entry-format
811This string will be inserted for each entry in the list.
812The following @samp{%} escapes are available:
813@table @samp
814@item %v
815Replaced with the buffer representation of the @var{type} widget.
816@item %b
817Replace with the radio button.
818@item %%
819Insert a literal @samp{%}.
820@end table
821
822@item button-args
823A list of keywords to pass to the radio buttons. Useful for setting
824e.g. the @samp{:help-echo} for each button.
825
826@item :buttons
827The widgets representing the radio buttons.
828
829@item :children
830The widgets representing each type.
831
832@item :choice
833The current chosen type
834
835@item :args
836The list of types.
837@end table
838
839You can add extra radio button items to a @code{radio-button-choice}
840widget after it has been created with the function
841@code{widget-radio-add-item}.
842
843@defun widget-radio-add-item widget type
844Add to @code{radio-button-choice} widget @var{widget} a new radio button item of type
845@var{type}.
846@end defun
847
848Please note that such items added after the @code{radio-button-choice}
849widget has been created will @strong{not} be properly destructed when
850you call @code{widget-delete}.
851
852@node item, choice-item, radio-button-choice, Basic Types
853@comment node-name, next, previous, up
854@subsection The @code{item} Widget
855
856Syntax:
857
858@example
859ITEM ::= (item [KEYWORD ARGUMENT]... VALUE)
860@end example
861
862The @var{value}, if present, is used to initialize the @code{:value}
863property. The value should be a string, which will be inserted in the
864buffer. This widget will only match the specified value.
865
866@node choice-item, toggle, item, Basic Types
867@comment node-name, next, previous, up
868@subsection The @code{choice-item} Widget
869
870Syntax:
871
872@example
873ITEM ::= (choice-item [KEYWORD ARGUMENT]... VALUE)
874@end example
875
876The @var{value}, if present, is used to initialize the @code{:value}
877property. The value should be a string, which will be inserted in the
878buffer as a button. Activating the button of a @code{choice-item} is
879equivalent to activating the parent widget. This widget will only match
880the specified value.
881
882@node toggle, checkbox, choice-item, Basic Types
883@comment node-name, next, previous, up
884@subsection The @code{toggle} Widget
885
886Syntax:
887
888@example
889TYPE ::= (toggle [KEYWORD ARGUMENT]...)
890@end example
891
54438eb5
DL
892The widget has two possible states, `on' and `off', which correspond to
893a @code{t} or @code{nil} value respectively.
6bf7aab6
DL
894
895The following extra properties are recognized.
896
897@table @code
898@item :on
899String representing the `on' state. By default the string @samp{on}.
900@item :off
901String representing the `off' state. By default the string @samp{off}.
902@item :on-glyph
903Name of a glyph to be used instead of the `:on' text string, on emacsen
904that supports it.
905@item :off-glyph
906Name of a glyph to be used instead of the `:off' text string, on emacsen
907that supports it.
908@end table
909
910@node checkbox, checklist, toggle, Basic Types
911@comment node-name, next, previous, up
912@subsection The @code{checkbox} Widget
913
914The widget has two possible states, `selected' and `unselected', which
915corresponds to a @code{t} or @code{nil} value.
916
917Syntax:
918
919@example
920TYPE ::= (checkbox [KEYWORD ARGUMENT]...)
921@end example
922
923@node checklist, editable-list, checkbox, Basic Types
924@comment node-name, next, previous, up
925@subsection The @code{checklist} Widget
926
927Syntax:
928
929@example
930TYPE ::= (checklist [KEYWORD ARGUMENT]... TYPE ... )
931@end example
932
54438eb5
DL
933The @var{type} arguments represents each checklist item. The widget's
934value will be a list containing the values of all ticked @var{type}
935arguments. The checklist widget will match a list whose elements all
936match at least one of the specified @var{type} arguments.
6bf7aab6
DL
937
938The following extra properties are recognized.
939
940@table @code
941@item :entry-format
942This string will be inserted for each entry in the list.
943The following @samp{%} escapes are available:
944@table @samp
945@item %v
946Replaced with the buffer representation of the @var{type} widget.
947@item %b
948Replace with the checkbox.
949@item %%
950Insert a literal @samp{%}.
951@end table
952
953@item :greedy
54438eb5 954Usually a checklist will only match if the items are in the exact
6bf7aab6
DL
955sequence given in the specification. By setting @code{:greedy} to
956non-nil, it will allow the items to come in any sequence. However, if
957you extract the value they will be in the sequence given in the
54438eb5 958checklist. I.e. the original sequence is forgotten.
6bf7aab6
DL
959
960@item button-args
961A list of keywords to pass to the checkboxes. Useful for setting
962e.g. the @samp{:help-echo} for each checkbox.
963
964@item :buttons
965The widgets representing the checkboxes.
966
967@item :children
968The widgets representing each type.
969
970@item :args
971The list of types.
972@end table
973
974@node editable-list, group, checklist, Basic Types
975@comment node-name, next, previous, up
976@subsection The @code{editable-list} Widget
977
978Syntax:
979
980@example
981TYPE ::= (editable-list [KEYWORD ARGUMENT]... TYPE)
982@end example
983
984The value is a list, where each member represents one widget of type
985@var{type}.
986
987The following extra properties are recognized.
988
989@table @code
990@item :entry-format
991This string will be inserted for each entry in the list.
992The following @samp{%} escapes are available:
993@table @samp
994@item %v
995This will be replaced with the buffer representation of the @var{type}
996widget.
997@item %i
998Insert the @b{[INS]} button.
999@item %d
1000Insert the @b{[DEL]} button.
1001@item %%
1002Insert a literal @samp{%}.
1003@end table
1004
1005@item :insert-button-args
1006A list of keyword arguments to pass to the insert buttons.
1007
1008@item :delete-button-args
1009A list of keyword arguments to pass to the delete buttons.
1010
1011@item :append-button-args
1012A list of keyword arguments to pass to the trailing insert button.
1013
1014
1015@item :buttons
1016The widgets representing the insert and delete buttons.
1017
1018@item :children
1019The widgets representing the elements of the list.
1020
1021@item :args
1022List whose car is the type of the list elements.
1023
1024@end table
1025
1026@node group, , editable-list, Basic Types
1027@comment node-name, next, previous, up
1028@subsection The @code{group} Widget
1029
1030This widget simply group other widget together.
1031
1032Syntax:
1033
1034@example
1035TYPE ::= (group [KEYWORD ARGUMENT]... TYPE...)
1036@end example
1037
1038The value is a list, with one member for each @var{type}.
1039
1040@node Sexp Types, Widget Properties, Basic Types, Top
1041@comment
1042@section Sexp Types
1043
1044A number of widgets for editing s-expressions (lisp types) are also
1045available. These basically fall in the following categories.
1046
1047@menu
1048* constants::
1049* generic::
1050* atoms::
1051* composite::
1052@end menu
1053
1054@node constants, generic, Sexp Types, Sexp Types
1055@comment node-name, next, previous, up
1056@subsection The Constant Widgets.
1057
1058The @code{const} widget can contain any lisp expression, but the user is
1059prohibited from editing edit it, which is mainly useful as a component
1060of one of the composite widgets.
1061
1062The syntax for the @code{const} widget is
1063
1064@example
1065TYPE ::= (const [KEYWORD ARGUMENT]... [ VALUE ])
1066@end example
1067
1068The @var{value}, if present, is used to initialize the @code{:value}
1069property and can be any s-expression.
1070
1071@deffn Widget const
1072This will display any valid s-expression in an immutable part of the
1073buffer.
1074@end deffn
1075
1076There are two variations of the @code{const} widget, namely
1077@code{variable-item} and @code{function-item}. These should contain a
1078symbol with a variable or function binding. The major difference from
1079the @code{const} widget is that they will allow the user to see the
1080variable or function documentation for the symbol.
1081
1082@deffn Widget variable-item
1083An immutable symbol that is bound as a variable.
1084@end deffn
1085
1086@deffn Widget function-item
1087An immutable symbol that is bound as a function.
1088@end deffn
1089
1090@node generic, atoms, constants, Sexp Types
1091@comment node-name, next, previous, up
1092@subsection Generic Sexp Widget.
1093
1094The @code{sexp} widget can contain any lisp expression, and allows the
1095user to edit it inline in the buffer.
1096
1097The syntax for the @code{sexp} widget is
1098
1099@example
1100TYPE ::= (sexp [KEYWORD ARGUMENT]... [ VALUE ])
1101@end example
1102
1103@deffn Widget sexp
1104This will allow you to edit any valid s-expression in an editable buffer
1105field.
1106
1107The @code{sexp} widget takes the same keyword arguments as the
1108@code{editable-field} widget.
1109@end deffn
1110
1111@node atoms, composite, generic, Sexp Types
1112@comment node-name, next, previous, up
1113@subsection Atomic Sexp Widgets.
1114
1115The atoms are s-expressions that does not consist of other
1116s-expressions. A string is an atom, while a list is a composite type.
1117You can edit the value of an atom with the following widgets.
1118
1119The syntax for all the atoms are
1120
1121@example
1122TYPE ::= (NAME [KEYWORD ARGUMENT]... [ VALUE ])
1123@end example
1124
1125The @var{value}, if present, is used to initialize the @code{:value}
1126property and must be an expression of the same type as the widget.
1127I.e. the string widget can only be initialized with a string.
1128
1129All the atom widgets take the same keyword arguments as the
1130@code{editable-field} widget.
1131
1132@deffn Widget string
1133Allows you to edit a string in an editable field.
1134@end deffn
1135
1136@deffn Widget regexp
1137Allows you to edit a regular expression in an editable field.
1138@end deffn
1139
1140@deffn Widget character
1141Allows you to enter a character in an editable field.
1142@end deffn
1143
1144@deffn Widget file
1145Allows you to edit a file name in an editable field. If you invoke
1146the tag button, you can edit the file name in the mini-buffer with
1147completion.
1148
1149Keywords:
1150@table @code
1151@item :must-match
1152If this is set to non-nil, only existing file names will be allowed in
1153the minibuffer.
1154@end table
1155@end deffn
1156
1157@deffn Widget directory
1158Allows you to edit a directory name in an editable field.
1159Similar to the @code{file} widget.
1160@end deffn
1161
1162@deffn Widget symbol
1163Allows you to edit a lisp symbol in an editable field.
1164@end deffn
1165
1166@deffn Widget function
1167Allows you to edit a lambda expression, or a function name with completion.
1168@end deffn
1169
1170@deffn Widget variable
1171Allows you to edit a variable name, with completion.
1172@end deffn
1173
1174@deffn Widget integer
1175Allows you to edit an integer in an editable field.
1176@end deffn
1177
1178@deffn Widget number
1179Allows you to edit a number in an editable field.
1180@end deffn
1181
1182@deffn Widget boolean
1183Allows you to edit a boolean. In lisp this means a variable which is
1184either nil meaning false, or non-nil meaning true.
1185@end deffn
1186
1187
1188@node composite, , atoms, Sexp Types
1189@comment node-name, next, previous, up
1190@subsection Composite Sexp Widgets.
1191
1192The syntax for the composite are
1193
1194@example
1195TYPE ::= (NAME [KEYWORD ARGUMENT]... COMPONENT...)
1196@end example
1197
1198Where each @var{component} must be a widget type. Each component widget
1199will be displayed in the buffer, and be editable to the user.
1200
1201@deffn Widget cons
1202The value of a @code{cons} widget is a cons-cell where the car is the
1203value of the first component and the cdr is the value of the second
1204component. There must be exactly two components.
1205@end deffn
1206
1207@deffn Widget list
1208The value of a @code{list} widget is a list containing the value of
1209each of its component.
1210@end deffn
1211
1212@deffn Widget vector
1213The value of a @code{vector} widget is a vector containing the value of
1214each of its component.
1215@end deffn
1216
1217The above suffice for specifying fixed size lists and vectors. To get
1218variable length lists and vectors, you can use a @code{choice},
1219@code{set} or @code{repeat} widgets together with the @code{:inline}
1220keywords. If any component of a composite widget has the @code{:inline}
1221keyword set, its value must be a list which will then be spliced into
1222the composite. For example, to specify a list whose first element must
1223be a file name, and whose remaining arguments should either by the
1224symbol @code{t} or two files, you can use the following widget
1225specification:
1226
1227@example
1228(list file
1229 (choice (const t)
1230 (list :inline t
1231 :value ("foo" "bar")
1232 string string)))
1233@end example
1234
1235The value of a widget of this type will either have the form
1236@samp{(file t)} or @code{(file string string)}.
1237
1238This concept of inline is probably hard to understand. It was certainly
54438eb5
DL
1239hard to implement so instead of confusing you more by trying to explain
1240it here, I'll just suggest you meditate over it for a while.
6bf7aab6
DL
1241
1242@deffn Widget choice
54438eb5
DL
1243Allows you to edit a sexp which may have one of a fixed set of types.
1244It is currently implemented with the @code{choice-menu} basic widget,
1245and has a similar syntax.
6bf7aab6
DL
1246@end deffn
1247
1248@deffn Widget set
1249Allows you to specify a type which must be a list whose elements all
1250belong to given set. The elements of the list is not significant. This
1251is implemented on top of the @code{checklist} basic widget, and has a
1252similar syntax.
1253@end deffn
1254
1255@deffn Widget repeat
1256Allows you to specify a variable length list whose members are all of
1257the same type. Implemented on top of the `editable-list' basic widget,
1258and has a similar syntax.
1259@end deffn
1260
1261@node Widget Properties, Defining New Widgets, Sexp Types, Top
1262@comment node-name, next, previous, up
1263@section Properties
1264
1265You can examine or set the value of a widget by using the widget object
1266that was returned by @code{widget-create}.
1267
1268@defun widget-value widget
1269Return the current value contained in @var{widget}.
1270It is an error to call this function on an uninitialized widget.
1271@end defun
1272
1273@defun widget-value-set widget value
1274Set the value contained in @var{widget} to @var{value}.
1275It is an error to call this function with an invalid @var{value}.
1276@end defun
1277
1278@strong{Important:} You @emph{must} call @code{widget-setup} after
1279modifying the value of a widget before the user is allowed to edit the
1280widget again. It is enough to call @code{widget-setup} once if you
1281modify multiple widgets. This is currently only necessary if the widget
1282contains an editing field, but may be necessary for other widgets in the
1283future.
1284
1285If your application needs to associate some information with the widget
1286objects, for example a reference to the item being edited, it can be
1287done with @code{widget-put} and @code{widget-get}. The property names
1288must begin with a @samp{:}.
1289
1290@defun widget-put widget property value
1291In @var{widget} set @var{property} to @var{value}.
1292@var{property} should be a symbol, while @var{value} can be anything.
1293@end defun
1294
1295@defun widget-get widget property
1296In @var{widget} return the value for @var{property}.
1297@var{property} should be a symbol, the value is what was last set by
1298@code{widget-put} for @var{property}.
1299@end defun
1300
1301@defun widget-member widget property
1302Non-nil if @var{widget} has a value (even nil) for property @var{property}.
1303@end defun
1304
1305Occasionally it can be useful to know which kind of widget you have,
1306i.e. the name of the widget type you gave when the widget was created.
1307
1308@defun widget-type widget
1309Return the name of @var{widget}, a symbol.
1310@end defun
1311
1312Widgets can be in two states: active, which means they are modifiable by
1313the user, or inactive, which means they cannot be modified by the user.
1314You can query or set the state with the following code:
1315
1316@lisp
1317;; Examine if @var{widget} is active or not.
1318(if (widget-apply @var{widget} :active)
1319 (message "Widget is active.")
1320 (message "Widget is inactive.")
1321
1322;; Make @var{widget} inactive.
1323(widget-apply @var{widget} :deactivate)
1324
1325;; Make @var{widget} active.
1326(widget-apply @var{widget} :activate)
1327@end lisp
1328
54438eb5
DL
1329A widget is inactive if it, or any of its ancestors (found by
1330following the @code{:parent} link), have been deactivated. To make sure
1331a widget is really active, you must therefore activate both it and
6bf7aab6
DL
1332all its ancestors.
1333
1334@lisp
1335(while widget
1336 (widget-apply widget :activate)
1337 (setq widget (widget-get widget :parent)))
1338@end lisp
1339
1340You can check if a widget has been made inactive by examining the value
54438eb5
DL
1341of the @code{:inactive} keyword. If this is non-nil, the widget itself
1342has been deactivated. This is different from using the @code{:active}
1343keyword, in that the latter tells you if the widget @strong{or} any of
1344its ancestors have been deactivated. Do not attempt to set the
6bf7aab6 1345@code{:inactive} keyword directly. Use the @code{:activate}
54438eb5 1346@code{:deactivate} keywords instead.
6bf7aab6
DL
1347
1348
1349@node Defining New Widgets, Widget Browser, Widget Properties, Top
1350@comment node-name, next, previous, up
1351@section Defining New Widgets
1352
1353You can define specialized widgets with @code{define-widget}. It allows
1354you to create a shorthand for more complex widgets, including specifying
54438eb5 1355component widgets and new default values for the keyword
6bf7aab6
DL
1356arguments.
1357
1358@defun widget-define name class doc &rest args
1359Define a new widget type named @var{name} from @code{class}.
1360
1361@var{name} and class should both be symbols, @code{class} should be one
1362of the existing widget types.
1363
1364The third argument @var{DOC} is a documentation string for the widget.
1365
1366After the new widget has been defined, the following two calls will
1367create identical widgets:
1368
1369@itemize @bullet
1370@item
1371@lisp
1372(widget-create @var{name})
1373@end lisp
1374
1375@item
1376@lisp
1377(apply widget-create @var{class} @var{args})
1378@end lisp
1379@end itemize
1380
1381@end defun
1382
54438eb5
DL
1383Using @code{widget-define} just stores the definition of the widget type
1384in the @code{widget-type} property of @var{name}, which is what
6bf7aab6
DL
1385@code{widget-create} uses.
1386
1387If you just want to specify defaults for keywords with no complex
1388conversions, you can use @code{identity} as your conversion function.
1389
1390The following additional keyword arguments are useful when defining new
1391widgets:
1392@table @code
1393@item :convert-widget
1394Function to convert a widget type before creating a widget of that
1395type. It takes a widget type as an argument, and returns the converted
1396widget type. When a widget is created, this function is called for the
54438eb5 1397widget type and all the widget's parent types, most derived first.
6bf7aab6
DL
1398
1399The following predefined functions can be used here:
1400
1401@defun widget-types-convert-widget widget
1402Convert @code{:args} as widget types in @var{widget}.
1403@end defun
1404
1405@defun widget-value-convert-widget widget
1406Initialize @code{:value} from @code{:args} in @var{widget}.
1407@end defun
1408
1409@item :value-to-internal
1410Function to convert the value to the internal format. The function
1411takes two arguments, a widget and an external value, and returns the
1412internal value. The function is called on the present @code{:value}
1413when the widget is created, and on any value set later with
1414@code{widget-value-set}.
1415
1416@item :value-to-external
1417Function to convert the value to the external format. The function
1418takes two arguments, a widget and an internal value, and returns the
1419internal value. The function is called on the present @code{:value}
1420when the widget is created, and on any value set later with
1421@code{widget-value-set}.
1422
1423@item :create
1424Function to create a widget from scratch. The function takes one
54438eb5
DL
1425argument, a widget type, and creates a widget of that type, inserts it
1426in the buffer, and returns a widget object.
6bf7aab6
DL
1427
1428@item :delete
1429Function to delete a widget. The function takes one argument, a widget,
1430and should remove all traces of the widget from the buffer.
1431
1432@item :value-create
1433Function to expand the @samp{%v} escape in the format string. It will
54438eb5
DL
1434be called with the widget as its argument and should insert a
1435representation of the widget's value in the buffer.
6bf7aab6
DL
1436
1437@item :value-delete
54438eb5 1438Should remove the representation of the widget's value from the buffer.
6bf7aab6
DL
1439It will be called with the widget as its argument. It doesn't have to
1440remove the text, but it should release markers and delete nested widgets
54438eb5 1441if such have been used.
6bf7aab6
DL
1442
1443The following predefined function can be used here:
1444
1445@defun widget-children-value-delete widget
1446Delete all @code{:children} and @code{:buttons} in @var{widget}.
1447@end defun
1448
1449@item :value-get
1450Function to extract the value of a widget, as it is displayed in the
1451buffer.
1452
1453The following predefined function can be used here:
1454
1455@defun widget-value-value-get widget
1456Return the @code{:value} property of @var{widget}.
1457@end defun
1458
1459@item :format-handler
1460Function to handle unknown @samp{%} escapes in the format string. It
1461will be called with the widget and the escape character as arguments.
1462You can set this to allow your widget to handle non-standard escapes.
1463
1464You should end up calling @code{widget-default-format-handler} to handle
1465unknown escape sequences, which will handle the @samp{%h} and any future
1466escape sequences, as well as give an error for unknown escapes.
1467
1468@item :action
1469Function to handle user initiated events. By default, @code{:notify}
1470the parent.
1471
1472The following predefined function can be used here:
1473
1474@defun widget-parent-action widget &optional event
1475Tell @code{:parent} of @var{widget} to handle the @code{:action}.
1476Optional @var{event} is the event that triggered the action.
1477@end defun
1478
1479@item :prompt-value
1480Function to prompt for a value in the minibuffer. The function should
1481take four arguments, @var{widget}, @var{prompt}, @var{value}, and
1482@var{unbound} and should return a value for widget entered by the user.
1483@var{prompt} is the prompt to use. @var{value} is the default value to
54438eb5 1484use, unless @var{unbound} is non-nil, in which case there is no default
6bf7aab6
DL
1485value. The function should read the value using the method most natural
1486for this widget, and does not have to check that it matches.
1487@end table
1488
1489If you want to define a new widget from scratch, use the @code{default}
1490widget as its base.
1491
1492@deffn Widget default
1493Widget used as a base for other widgets.
1494
1495It provides most of the functionality that is referred to as ``by
1496default'' in this text.
1497@end deffn
1498
1499@node Widget Browser, Widget Minor Mode, Defining New Widgets, Top
1500@comment node-name, next, previous, up
1501@section Widget Browser
1502
1503There is a separate package to browse widgets. This is intended to help
1504programmers who want to examine the content of a widget. The browser
1505shows the value of each keyword, but uses links for certain keywords
1506such as `:parent', which avoids printing cyclic structures.
1507
1508@deffn Command widget-browse WIDGET
1509Create a widget browser for WIDGET.
1510When called interactively, prompt for WIDGET.
1511@end deffn
1512
1513@deffn Command widget-browse-other-window WIDGET
1514Create a widget browser for WIDGET and show it in another window.
1515When called interactively, prompt for WIDGET.
1516@end deffn
1517
1518@deffn Command widget-browse-at POS
1519Create a widget browser for the widget at POS.
1520When called interactively, use the position of point.
1521@end deffn
1522
1523@node Widget Minor Mode, Utilities, Widget Browser, Top
1524@comment node-name, next, previous, up
1525@section Widget Minor Mode
1526
1527There is a minor mode for manipulating widgets in major modes that
1528doesn't provide any support for widgets themselves. This is mostly
1529intended to be useful for programmers doing experiments.
1530
1531@deffn Command widget-minor-mode
1532Toggle minor mode for traversing widgets.
1533With arg, turn widget mode on if and only if arg is positive.
1534@end deffn
1535
1536@defvar widget-minor-mode-keymap
1537Keymap used in @code{widget-minor-mode}.
1538@end defvar
1539
1540@node Utilities, Widget Wishlist, Widget Minor Mode, Top
1541@comment node-name, next, previous, up
1542@section Utilities.
1543
1544@defun widget-prompt-value widget prompt [ value unbound ]
1545Prompt for a value matching @var{widget}, using @var{prompt}.
1546The current value is assumed to be @var{value}, unless @var{unbound} is
1547non-nil.@refill
1548@end defun
1549
1550@defun widget-get-sibling widget
1551Get the item @var{widget} is assumed to toggle.
1552This is only meaningful for radio buttons or checkboxes in a list.
1553@end defun
1554
1555@node Widget Wishlist, , Utilities, Top
1556@comment node-name, next, previous, up
1557@section Wishlist
1558
1559@itemize @bullet
1560@item
1561It should be possible to add or remove items from a list with @kbd{C-k}
1562and @kbd{C-o} (suggested by @sc{rms}).
1563
1564@item
1565The @samp{[INS]} and @samp{[DEL]} buttons should be replaced by a single
1566dash (@samp{-}). The dash should be a button that, when invoked, ask
1567whether you want to add or delete an item (@sc{rms} wanted to git rid of
1568the ugly buttons, the dash is my idea).
1569
1570@item
1571The @code{menu-choice} tag should be prettier, something like the abbreviated
1572menus in Open Look.
1573
1574@item
1575Finish @code{:tab-order}.
1576
1577@item
1578Make indentation work with glyphs and proportional fonts.
1579
1580@item
1581Add commands to show overview of object and class hierarchies to the
1582browser.
1583
1584@item
1585Find a way to disable mouse highlight for inactive widgets.
1586
1587@item
1588Find a way to make glyphs look inactive.
1589
1590@item
1591Add @code{property-list} widget.
1592
1593@item
1594Add @code{association-list} widget.
1595
1596@item
1597Add @code{key-binding} widget.
1598
1599@item
1600Add @code{widget} widget for editing widget specifications.
1601
1602@item
1603Find clean way to implement variable length list.
1604See @code{TeX-printer-list} for an explanation.
1605
1606@item
1607@kbd{C-h} in @code{widget-prompt-value} should give type specific help.
1608
1609@item
1610A mailto widget.
1611
1612@end itemize
1613
56f7c94a 1614@setchapternewpage odd
6bf7aab6
DL
1615@contents
1616@bye