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