From dce04f7f90fa8f613dd855cb300c837696483f1b Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 26 Apr 2012 16:43:20 +0800 Subject: [PATCH] * image.el (image-type-from-buffer): Only return supported image type. Fixes: debbugs:9045 --- lisp/ChangeLog | 3 +++ lisp/image.el | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) 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 -- 2.39.2