From: Chong Yidong Date: Thu, 26 Apr 2012 08:43:20 +0000 (+0800) Subject: * image.el (image-type-from-buffer): Only return supported image type. X-Git-Tag: emacs-24.2.90~471^2~263 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dce04f7f90fa8f613dd855cb300c837696483f1b;p=emacs.git * image.el (image-type-from-buffer): Only return supported image type. Fixes: debbugs:9045 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a709c017416..ad6fd35bc5d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2012-04-26 Chong Yidong + * 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) 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