Function: custom-save-icons

custom-save-icons is an autoloaded and byte-compiled function defined in cus-edit.el.gz.

Signature

(custom-save-icons)

Documentation

Save all customized icons in custom-file(var)/custom-file(fun).

Source Code

;; Defined in /usr/src/emacs/lisp/cus-edit.el.gz
;;;###autoload
(defun custom-save-icons ()
  "Save all customized icons in `custom-file'."
  (let ((values nil))
    (mapatoms
     (lambda (symbol)
       (let ((value (car-safe (get symbol 'theme-icon))))
	 (when (eq (car value) 'user)
           (push (list symbol (cadr value)) values)))))
    (save-excursion
      (custom-save-delete 'custom-set-icons)
      (when values
        (ensure-empty-lines)
        (insert "(custom-set-icons
 ;; custom-set-icons was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.\n")
        (dolist (value (sort values (lambda (s1 s2)
                                      (string< (car s1) (car s2)))))
	  (unless (bolp)
	    (insert "\n"))
          (insert "  '")
          (prin1 value (current-buffer)))
        (insert ")\n")))))