Function: widget-alist-default-get
widget-alist-default-get is a byte-compiled function defined in
wid-edit.el.gz.
Signature
(widget-alist-default-get WIDGET)
Documentation
Return the default value for WIDGET, an alist widget.
The default value may be one of:
- The one stored in the :value property, even if it is nil.
- If WIDGET has options available, an alist consisting of the
default values for each option.
- nil, otherwise.
Source Code
;; Defined in /usr/src/emacs/lisp/wid-edit.el.gz
(defun widget-alist-default-get (widget)
"Return the default value for WIDGET, an alist widget.
The default value may be one of:
- The one stored in the :value property, even if it is nil.
- If WIDGET has options available, an alist consisting of the
default values for each option.
- nil, otherwise."
(widget-apply widget :value-to-external
(cond ((widget-member widget :value)
(widget-get widget :value))
((widget-get widget :options)
(mapcar #'widget-default-get
;; Last one is the editable-list part, and
;; we don't want those showing up as
;; part of the default value. (Bug#63290)
(butlast (widget-get widget :args))))
(t nil))))