1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00

(image-type): Check if image-types is bound to not fail on tty.

This commit is contained in:
Juri Linkov 2007-10-06 22:17:49 +00:00
parent 7017d784e7
commit 28681e350c

View File

@ -323,7 +323,7 @@ Optional DATA-P non-nil means SOURCE is a string containing image data."
(or (image-type-from-file-header source) (or (image-type-from-file-header source)
(image-type-from-file-name source)))) (image-type-from-file-name source))))
(or type (error "Cannot determine image type"))) (or type (error "Cannot determine image type")))
(or (memq type image-types) (or (memq type (and (boundp 'image-types) image-types))
(error "Invalid image type `%s'" type)) (error "Invalid image type `%s'" type))
type) type)