[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] shr-fontified 35d95a2 9/9: (shr-insert-table): Expand tabl
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] shr-fontified 35d95a2 9/9: (shr-insert-table): Expand table alignments in any buffer at the end. |
Date: |
Mon, 09 Feb 2015 10:39:11 +0000 |
branch: shr-fontified
commit 35d95a222d45ad79d5b22a9733bb044309ce02c5
Author: Lars Magne Ingebrigtsen <address@hidden>
Commit: Lars Magne Ingebrigtsen <address@hidden>
(shr-insert-table): Expand table alignments in any buffer at the end.
---
lisp/ChangeLog | 1 +
lisp/net/shr.el | 14 ++++----------
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index fb00cd6..e56741f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -8,6 +8,7 @@
(shr-insert-table): Get colspan pro-rating right by distributing
the zero-length columns in the right place.
(shr-fold-line): Keep breaking unbreakable text.
+ (shr-insert-table): Expand table alignments in any buffer at the end.
2015-02-08 Lars Ingebrigtsen <address@hidden>
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 58d2e20..2f439be 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -1622,6 +1622,8 @@ The preference is a float determined from
`shr-prefer-media-type'."
;; model isn't strong enough to allow us to put the images actually
;; into the tables.
(when (zerop shr-table-depth)
+ (save-excursion
+ (shr-expand-alignments start (point)))
(dolist (elem (dom-by-tag dom 'object))
(shr-tag-object elem))
(dolist (elem (dom-by-tag dom 'img))
@@ -1689,11 +1691,8 @@ The preference is a float determined from
`shr-prefer-media-type'."
(forward-line 1))))))
(unless collapse
(shr-insert-table-ruler widths)))
- (if (equal (buffer-name) "*eww*")
- (save-excursion
- (shr-expand-alignments start (point)))
- (unless (= start (point))
- (put-text-property start (1+ start) 'shr-table-id shr-table-id)))))
+ (unless (= start (point))
+ (put-text-property start (1+ start) 'shr-table-id shr-table-id))))
(defun shr-expand-alignments (start end)
(while (< (setq start (next-single-property-change
@@ -1881,11 +1880,6 @@ The preference is a float determined from
`shr-prefer-media-type'."
(defun shr-render-td (dom width fill)
(let ((cache (intern (format "shr-td-cache-%s-%s" width fill))))
(or (dom-attr dom cache)
- (let ((natural (dom-attr dom 'shr-td-cache-natural)))
- (and (not fill)
- natural
- (>= width natural)
- natural))
(and fill
(let (result)
(dolist (attr (dom-attributes dom))
- [Emacs-diffs] shr-fontified updated (70199c1 -> 35d95a2), Lars Ingebrigtsen, 2015/02/09
- [Emacs-diffs] shr-fontified 1376a51 2/9: shr/Gnus face fixup and <li> rendering fix, Lars Ingebrigtsen, 2015/02/09
- [Emacs-diffs] shr-fontified fe9660e 1/9: Rework the indentation to work more generally, Lars Ingebrigtsen, 2015/02/09
- [Emacs-diffs] shr-fontified b0e3d92 3/9: (shr-fold-line): Handle lines that end with a space at the fill point., Lars Ingebrigtsen, 2015/02/09
- [Emacs-diffs] shr-fontified 217e202 5/9: Further colspan fixes, Lars Ingebrigtsen, 2015/02/09
- [Emacs-diffs] shr-fontified 659202a 6/9: Fix up last change to really get colspans right, Lars Ingebrigtsen, 2015/02/09
- [Emacs-diffs] shr-fontified 8180e53 7/9: (shr-fold-line): Keep breaking unbreakable text., Lars Ingebrigtsen, 2015/02/09
- [Emacs-diffs] shr-fontified 1d5d72e 4/9: shr filling fix-ups, Lars Ingebrigtsen, 2015/02/09
- [Emacs-diffs] shr-fontified 25f55f7 8/9: Don't infloop on unbreakable, indented lines, Lars Ingebrigtsen, 2015/02/09
- [Emacs-diffs] shr-fontified 35d95a2 9/9: (shr-insert-table): Expand table alignments in any buffer at the end.,
Lars Ingebrigtsen <=