Function: define-icon
define-icon is a macro defined in icons.el.gz.
Signature
(define-icon NAME PARENT SPECIFICATION DOCUMENTATION &rest KEYWORDS)
Documentation
Define an icon identified by NAME.
If non-nil, inherit the specification from PARENT. Entries from SPECIFICATION will override inherited specifications.
SPECIFICATION is an alist of entries where the first element is
the type, and the rest are icons of that type. Valid types are
image, emoji, symbol and text.
KEYWORDS specify additional information. Valid keywords are:
:version: The first Emacs version to include this icon; this is
mandatory.
:group: The customization group the icon belongs in; this is
inferred if not present.
:help-echo: Informational text that explains what happens if
the icon is used as a button and you click it.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/icons.el.gz
(defmacro define-icon (name parent specification documentation &rest keywords)
"Define an icon identified by NAME.
If non-nil, inherit the specification from PARENT. Entries from
SPECIFICATION will override inherited specifications.
SPECIFICATION is an alist of entries where the first element is
the type, and the rest are icons of that type. Valid types are
`image', `emoji', `symbol' and `text'.
KEYWORDS specify additional information. Valid keywords are:
`:version': The first Emacs version to include this icon; this is
mandatory.
`:group': The customization group the icon belongs in; this is
inferred if not present.
`:help-echo': Informational text that explains what happens if
the icon is used as a button and you click it."
(declare (doc-string 4) (indent 2))
(unless (symbolp name)
(error "NAME must be a symbol: %S" name))
(unless (plist-get keywords :version)
(error "There must be a :version keyword in `define-icon'"))
`(icons--register ',name ',parent ,specification ,documentation
',keywords))