Function: defimage
defimage is an autoloaded macro defined in image.el.gz.
Signature
(defimage SYMBOL SPECS &optional DOC)
Documentation
Define SYMBOL as an image, and return SYMBOL.
SPECS is a list of image specifications. DOC is an optional documentation string.
Each image specification in SPECS is a property list. The contents of
a specification are image type dependent. All specifications must at
least contain the properties :type TYPE and either :file FILE or
:data DATA, where TYPE is a symbol specifying the image type,
e.g. xbm, FILE is the file to load the image from, and DATA is a
string containing the actual image data. The first image
specification whose TYPE is supported, and FILE exists, is used to
define SYMBOL.
Example:
(defimage test-image ((:type xpm :file "~/test1.xpm")
(:type xbm :file "~/test1.xbm")))
Probably introduced at or before Emacs version 21.1.
Source Code
;; Defined in /usr/src/emacs/lisp/image.el.gz
;;;###autoload
(defmacro defimage (symbol specs &optional doc)
"Define SYMBOL as an image, and return SYMBOL.
SPECS is a list of image specifications. DOC is an optional
documentation string.
Each image specification in SPECS is a property list. The contents of
a specification are image type dependent. All specifications must at
least contain the properties `:type TYPE' and either `:file FILE' or
`:data DATA', where TYPE is a symbol specifying the image type,
e.g. `xbm', FILE is the file to load the image from, and DATA is a
string containing the actual image data. The first image
specification whose TYPE is supported, and FILE exists, is used to
define SYMBOL.
Example:
(defimage test-image ((:type xpm :file \"~/test1.xpm\")
(:type xbm :file \"~/test1.xbm\")))"
(declare (doc-string 3) (indent defun))
`(defvar ,symbol (find-image ',specs) ,doc))