From a959fc400dcb53d091eafe2fe2b866fd67e5803e Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Thu, 6 Oct 2011 09:25:26 +0000 Subject: [PATCH] shr.el (shr-tag-img): Don't get images displayed in tables. --- lisp/gnus/ChangeLog | 4 ++++ lisp/gnus/shr.el | 13 +++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 2e42435d22c..b2d907b7a86 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,7 @@ +2011-10-06 Katsumi Yamaoka + + * shr.el (shr-tag-img): Don't get images displayed in tables. + 2011-10-03 Glenn Morris * gnus-group.el (gnus-bug-group-download-format-alist): Once again get diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el index ddf47f4ed14..7b9af3302af 100644 --- a/lisp/gnus/shr.el +++ b/lisp/gnus/shr.el @@ -914,12 +914,13 @@ ones, in case fg and bg are nil." (shr-encode-url url) 'shr-image-fetched (list (current-buffer) start (set-marker (make-marker) (1- (point)))) t))) - (put-text-property start (point) 'keymap shr-map) - (put-text-property start (point) 'shr-alt alt) - (put-text-property start (point) 'image-url url) - (put-text-property start (point) 'image-displayer - (shr-image-displayer shr-content-function)) - (put-text-property start (point) 'help-echo alt) + (when (zerop shr-table-depth) ;; We are not in a table. + (put-text-property start (point) 'keymap shr-map) + (put-text-property start (point) 'shr-alt alt) + (put-text-property start (point) 'image-url url) + (put-text-property start (point) 'image-displayer + (shr-image-displayer shr-content-function)) + (put-text-property start (point) 'help-echo alt)) (setq shr-state 'image))))) (defun shr-tag-pre (cont) -- 2.39.2