[gnus git] branch master updated: m0-7-121-g0fafcfd =1= Don't colourise images from tables
Lars Magne Ingebrigtsen <[email protected]>
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via 0fafcfd05d8e4dbfae06a44423483ee509fe17de (commit)
from b6cfb4b5425506ac4d2f8b919296d4cb7c46943e (commit)
- Log -----------------------------------------------------------------
commit 0fafcfd05d8e4dbfae06a44423483ee509fe17de
Author: Lars Magne Ingebrigtsen <[email protected]>
Date: Tue Jun 18 12:08:14 2013 +0200
Don't colourise images from tables
* shr.el (shr-tag-table): Insert the images after the table, so that
they're not covered by the table coulorisation, which often looked
awkward.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index bc4f9fc..8a93331 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2013-06-18 Lars Magne Ingebrigtsen <[email protected]>
+
+ * shr.el (shr-tag-table): Insert the images after the table, so that
+ they're not covered by the table colourisation, which often looked
+ awkward.
+
2013-06-18 Katsumi Yamaoka <[email protected]>
* eww.el (eww-detect-charset): Improve regexp; move backward.
diff --git a/lisp/shr.el b/lisp/shr.el
index 06abde9..1c940be 100644
--- a/lisp/shr.el
+++ b/lisp/shr.el
@@ -1248,13 +1248,7 @@ ones, in case fg and bg are nil."
(frame-width))
(setq truncate-lines t))
;; Then render the table again with these new "hard" widths.
- (shr-insert-table (shr-make-table cont sketch-widths t) sketch-widths))
- ;; Finally, insert all the images after the table. The Emacs buffer
- ;; model isn't strong enough to allow us to put the images actually
- ;; into the tables.
- (when (zerop shr-table-depth)
- (dolist (elem (shr-find-elements cont 'img))
- (shr-tag-img (cdr elem)))))
+ (shr-insert-table (shr-make-table cont sketch-widths t) sketch-widths)))
(defun shr-tag-table (cont)
(shr-ensure-paragraph)
@@ -1318,7 +1312,13 @@ ones, in case fg and bg are nil."
body))))))
(when bgcolor
(shr-colorize-region start (point) (cdr (assq 'color shr-stylesheet))
- bgcolor))))
+ bgcolor))
+ ;; Finally, insert all the images after the table. The Emacs buffer
+ ;; model isn't strong enough to allow us to put the images actually
+ ;; into the tables.
+ (when (zerop shr-table-depth)
+ (dolist (elem (shr-find-elements cont 'img))
+ (shr-tag-img (cdr elem))))))
(defun shr-find-elements (cont type)
(let (result)
-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.
Summary of changes:
lisp/ChangeLog | 6 ++++++
lisp/shr.el | 16 ++++++++--------
2 files changed, 14 insertions(+), 8 deletions(-)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".
The branch, master has been updated
hooks/post-receive
--
Gnus Project