Function: toolbarx-test-image-type
toolbarx-test-image-type is a byte-compiled function defined in
toolbar-x.el.
Signature
(toolbarx-test-image-type OBJ)
Documentation
Return a cons cell (GOOD-OBJ . VAL).
GOOD-OBJ is non-nil if OBJ yields a valid image object VAL (see
documentation of function toolbarx-process-symbol).
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/toolbar-x.el
(defun toolbarx-test-image-type (obj)
"Return a cons cell (GOOD-OBJ . VAL).
GOOD-OBJ is non-nil if OBJ yields a valid image object VAL (see
documentation of function `toolbarx-process-symbol')."
(let ((toolbarx-test-image-type-simple
(lambda (img)
(let* ((val (toolbarx-option-value img))
(all-obj-ok t)
(good-obj
(or (stringp val) ; string
(eq (car-safe val) 'image) ; or image descriptor
(and (symbolp val) ; or a symbol bound to a
(boundp val) ; image descriptor
; (defined with `defimage')
(consp (symbol-value val))
(eq (car (symbol-value val)) 'image))
(and (listp val) ; or list with 4 strings or
; image descriptors
(= (length val) 4)
(dolist (i val all-obj-ok)
(setq all-obj-ok
(and all-obj-ok
(or (stringp i)
(eq (car-safe i) 'image)))))))))
(cons good-obj val)))))
(toolbarx-eval-function-or-symbol obj toolbarx-test-image-type-simple)))