emacs-diffs
[Top][All Lists]
Advanced

[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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]