]> git.eshelyaron.com Git - emacs.git/commitdiff
* image.el (image-type-from-buffer): Only return supported image type.
authorChong Yidong <cyd@gnu.org>
Thu, 26 Apr 2012 08:43:20 +0000 (16:43 +0800)
committerChong Yidong <cyd@gnu.org>
Thu, 26 Apr 2012 08:43:20 +0000 (16:43 +0800)
Fixes: debbugs:9045
lisp/ChangeLog
lisp/image.el

index a709c0174160a5d5d2fa80bc58a1f2adf7465b66..ad6fd35bc5d1e019e75a5b329742c6fbbabd0145 100644 (file)
@@ -1,5 +1,8 @@
 2012-04-26  Chong Yidong  <cyd@gnu.org>
 
+       * image.el (image-type-from-buffer): Only return supported image
+       type (Bug#9045).
+
        * vc/diff-mode.el (diff-beginning-of-hunk): Return a meaningful
        value, for symmetry with diff-end-of-hunk.
        (diff-split-hunk, diff-find-source-location)
index 348c208781e601e3a7e227962a16b4b19c0457e7..27e41a57efec308a3e6e2b156b2006da6747a415 100644 (file)
@@ -282,7 +282,9 @@ be determined."
                  types nil)
          (setq types (cdr types)))))
     (goto-char opoint)
-    type))
+    (and type
+        (memq type image-types)
+        type)))
 
 
 ;;;###autoload