Function: widget-complete

widget-complete is an interactive and byte-compiled function defined in wid-edit.el.gz.

Signature

(widget-complete)

Documentation

Complete content of editable field from point.

When not inside a field, signal an error.

View in manual

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/wid-edit.el.gz
;; This used to say:
;; "When not inside a field, move to the previous button or field."
;; but AFAICS, it has always just thrown an error.
(defun widget-complete ()
  "Complete content of editable field from point.
When not inside a field, signal an error."
  (interactive)
  (let ((data (widget-completions-at-point)))
    (cond
     ((functionp data) (funcall data))
     ((consp data)
      (let ((completion-extra-properties (nth 3 data)))
        (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data)
                              (plist-get completion-extra-properties
                                         :predicate))))
     (t
      (error "No completions available for this field")))))