summaryrefslogtreecommitdiff
path: root/lisp/image.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2012-04-26 16:43:20 +0800
committerChong Yidong <cyd@gnu.org>2012-04-26 16:43:20 +0800
commitdce04f7f90fa8f613dd855cb300c837696483f1b (patch)
tree8d3b3887460f2bc8602ac09622e683b38db52bfb /lisp/image.el
parentcb3e7ae07a6ad7c46f5d67984d54f10f19103bef (diff)
downloademacs-dce04f7f90fa8f613dd855cb300c837696483f1b.tar.gz
* image.el (image-type-from-buffer): Only return supported image type.
Fixes: debbugs:9045
Diffstat (limited to 'lisp/image.el')
-rw-r--r--lisp/image.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/image.el b/lisp/image.el
index 348c208781e..27e41a57efe 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -282,7 +282,9 @@ be determined."
types nil)
(setq types (cdr types)))))
(goto-char opoint)
- type))
+ (and type
+ (memq type image-types)
+ type)))
;;;###autoload