Function: eieio-object-value-get
eieio-object-value-get is a byte-compiled function defined in
eieio-custom.el.gz.
Signature
(eieio-object-value-get WIDGET)
Documentation
Get the value of WIDGET.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/eieio-custom.el.gz
(defun eieio-object-value-get (widget)
"Get the value of WIDGET."
(let* ((obj (widget-get widget :value))
(master-group eieio-cog)
(wids (widget-get widget :children))
(name (if (widget-get widget :eieio-show-name)
(car (widget-apply (car wids) :value-inline))
nil))
(chil (if (widget-get widget :eieio-show-name)
(nthcdr 1 wids) wids))
(cv (eieio--object-class obj))
(i 0)
(slots (eieio--class-slots cv)))
;; If there are any prefix widgets, clear them.
;; -- None yet
;; Create a batch of initargs for each slot.
(while (and (< i (length slots)) chil)
(let* ((slot (aref slots i))
(props (cl--slot-descriptor-props slot))
(cust (alist-get :custom props)))
;;
;; Shouldn't I be incremented unconditionally? Or
;; better shouldn't we simply mapc on the slots vector
;; avoiding use of this integer variable? PLN Sat May
;; 2 07:35:45 2015
;;
(setq i (+ i 1))
(if (and cust
(or eieio-custom-ignore-eieio-co
(not master-group)
(member master-group (alist-get :group props)))
(slot-boundp obj (cl--slot-descriptor-name slot)))
(progn
;; Only customized slots have widgets
(let ((eieio-custom-ignore-eieio-co t))
(eieio-oset obj (cl--slot-descriptor-name slot)
(car (widget-apply (car chil) :value-inline))))
(setq chil (cdr chil))))))
;; Set any name updates on it.
(when name
(setf (slot-value obj 'object-name) name))
;; This is the same object we had before.
obj))