From: Juri Linkov Date: Sat, 6 Oct 2007 22:17:49 +0000 (+0000) Subject: (image-type): Check if image-types is bound to not fail on tty. X-Git-Tag: emacs-pretest-23.0.90~10502 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=28681e350ccd92660d2b1be048e49e3e1d049e5d;p=emacs.git (image-type): Check if image-types is bound to not fail on tty. --- diff --git a/lisp/image.el b/lisp/image.el index 7e42c26dd69..99632b84307 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -323,7 +323,7 @@ Optional DATA-P non-nil means SOURCE is a string containing image data." (or (image-type-from-file-header source) (image-type-from-file-name source)))) (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)) type)