comparison man/widget.texi @ 209:41ff10fd062f r20-4b3

Import from CVS: tag r20-4b3
author cvs
date Mon, 13 Aug 2007 10:04:58 +0200
parents f53b5ca2e663
children 8bec6624d99b
comparison
equal deleted inserted replaced
208:f427b8ec4379 209:41ff10fd062f
10 @c %**end of header 10 @c %**end of header
11 11
12 @node Top, Introduction, (dir), (dir) 12 @node Top, Introduction, (dir), (dir)
13 @comment node-name, next, previous, up 13 @comment node-name, next, previous, up
14 @top The Emacs Widget Library 14 @top The Emacs Widget Library
15
16 Version: 1.9960
17 15
18 @menu 16 @menu
19 * Introduction:: 17 * Introduction::
20 * User Interface:: 18 * User Interface::
21 * Programming Example:: 19 * Programming Example::
285 (defvar widget-example-repeat) 283 (defvar widget-example-repeat)
286 284
287 (defun widget-example () 285 (defun widget-example ()
288 "Create the widgets from the Widget manual." 286 "Create the widgets from the Widget manual."
289 (interactive) 287 (interactive)
290 (switch-to-buffer "*Widget Example*") 288 (kill-buffer (get-buffer-create "*Widget Example*"))
289 (switch-to-buffer (get-buffer-create "*Widget Example*"))
291 (kill-all-local-variables) 290 (kill-all-local-variables)
292 (make-local-variable 'widget-example-repeat) 291 (make-local-variable 'widget-example-repeat)
293 (let ((inhibit-read-only t))
294 (erase-buffer))
295 (let ((all (overlay-lists)))
296 ;; Delete all the overlays.
297 (mapcar 'delete-overlay (car all))
298 (mapcar 'delete-overlay (cdr all)))
299 (widget-insert "Here is some documentation.\n\nName: ") 292 (widget-insert "Here is some documentation.\n\nName: ")
300 (widget-create 'editable-field 293 (widget-create 'editable-field
301 :size 13 294 :size 13
302 "My Name") 295 "My Name")
303 (widget-create 'menu-choice 296 (widget-create 'menu-choice