Function: widget-setup

widget-setup is an autoloaded and byte-compiled function defined in wid-edit.el.gz.

Signature

(widget-setup)

Documentation

Setup current buffer so editing string widgets works.

Source Code

;; Defined in /usr/src/emacs/lisp/wid-edit.el.gz
;;;###autoload
(defun widget-setup ()
  "Setup current buffer so editing string widgets works."
  (let ((inhibit-read-only t)
	(inhibit-modification-hooks t)
	field)
    (while widget-field-new
      (setq field (car widget-field-new)
	    widget-field-new (cdr widget-field-new)
	    widget-field-list (cons field widget-field-list))
      (let ((from (car (widget-get field :field-overlay)))
	    (to (cdr (widget-get field :field-overlay))))
	(widget-specify-field field
			      (marker-position from) (marker-position to))
	(set-marker from nil)
	(set-marker to nil))))
  (widget-clear-undo)
  (widget-add-change))