Function: custom-icon-set

custom-icon-set is a byte-compiled function defined in cus-edit.el.gz.

Signature

(custom-icon-set WIDGET)

Documentation

Set the current spec for the icon being edited by WIDGET.

Source Code

;; Defined in /usr/src/emacs/lisp/cus-edit.el.gz
(defun custom-icon-set (widget)
  "Set the current spec for the icon being edited by WIDGET."
  (let* ((state (widget-get widget :custom-state))
	 (child (car (widget-get widget :children)))
	 (symbol (widget-value widget))
	 val)
    (when (eq state 'hidden)
      (user-error "Cannot update hidden icon"))

    (setq val (custom--icons-widget-value child))
    ;; FIXME: What was the intention here?
    ;; (unless (equal val (icon-complete-spec symbol))
    ;;   (custom-variable-backup-value widget))
    (custom-push-theme 'theme-icon symbol 'user 'set val)
    (custom-redraw widget)))