From: Katsumi Yamaoka Date: Fri, 3 Sep 2010 06:10:04 +0000 (+0000) Subject: gnus-html.el (gnus-html-put-image): make avoidance of displaying small images work... X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~48^2~118 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=59f65f5c422ffda9b4cf9d9b97ed80785064abfc;p=emacs.git gnus-html.el (gnus-html-put-image): make avoidance of displaying small images work for XEmacs. --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 55b59c8d6bc..c23a59867e2 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -2,7 +2,7 @@ * gnus-html.el (gnus-html-put-image): Use gnus-graphic-display-p, glyph-width and glyph-height instead of display-graphic-p and - image-size for XEmacs. + image-size; make avoidance of displaying small images work for XEmacs. * gnus-util.el (gnus-graphic-display-p): Use device-on-window-system-p for XEmacs. diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el index 399676f0600..8717a4630df 100644 --- a/lisp/gnus/gnus-html.el +++ b/lisp/gnus/gnus-html.el @@ -254,8 +254,16 @@ fit these criteria." (if (and image ;; Kludge to avoid displaying 30x30 gif images, which ;; seems to be a signal of a broken image. - (not (and (listp image) - (eq (plist-get (cdr image) :type) 'gif) + (not (and (if (featurep 'xemacs) + (glyphp image) + (listp image)) + (eq (if (featurep 'xemacs) + (let ((data (cdadar (specifier-spec-list + (glyph-image image))))) + (and (vectorp data) + (aref data 0))) + (plist-get (cdr image) :type)) + 'gif) (= (car size) 30) (= (cdr size) 30)))) (progn