Function: icon-complete-spec
icon-complete-spec is a byte-compiled function defined in icons.el.gz.
Signature
(icon-complete-spec ICON &optional INHIBIT-THEME INHIBIT-INHERITANCE)
Documentation
Return the merged spec for ICON.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/icons.el.gz
(defun icon-complete-spec (icon &optional inhibit-theme inhibit-inheritance)
"Return the merged spec for ICON."
(pcase-let ((`(,parent ,spec _ _) (iconp icon)))
;; We destructively modify `spec' when merging, so copy it.
(setq spec (icons--copy-spec spec))
;; Let the Customize theme override.
(unless inhibit-theme
(when-let* ((theme-spec (cadr (car (get icon 'theme-icon)))))
(setq spec (icons--merge-spec (icons--copy-spec theme-spec) spec))))
;; Inherit from the parent spec (recursively).
(unless inhibit-inheritance
(while parent
(let ((parent-props (get parent 'icon--properties)))
(when parent-props
(setq spec (icons--merge-spec spec (cadr parent-props))))
(setq parent (car parent-props)))))
spec))