[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r113723: shr table rendering touch-ups
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] trunk r113723: shr table rendering touch-ups |
Date: |
Tue, 06 Aug 2013 21:28:42 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 113723
revision-id: address@hidden
parent: address@hidden
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Tue 2013-08-06 23:28:38 +0200
message:
shr table rendering touch-ups
* net/shr.el (shr-render-td): Remove debugging.
(shr-render-td): Make width computation consistent by defaulting
all zero-width columns to 10 characters. This may not be optimal,
but it's at least consistent.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/net/shr.el shr.el-20101002102929-yfzewk55rsg0mn93-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-08-06 16:33:14 +0000
+++ b/lisp/ChangeLog 2013-08-06 21:28:38 +0000
@@ -1,3 +1,10 @@
+2013-08-06 Lars Magne Ingebrigtsen <address@hidden>
+
+ * net/shr.el (shr-render-td): Remove debugging.
+ (shr-render-td): Make width computation consistent by defaulting
+ all zero-width columns to 10 characters. This may not be optimal,
+ but it's at least consistent.
+
2013-08-06 Dmitry Antipov <address@hidden>
* files.el (cache-long-line-scans): Make
=== modified file 'lisp/net/shr.el'
--- a/lisp/net/shr.el 2013-07-30 14:58:37 +0000
+++ b/lisp/net/shr.el 2013-08-06 21:28:38 +0000
@@ -1496,11 +1496,11 @@
shr-table-separator-length
(aref widths (+ i 1 j))))))
(setq width-column (+ width-column (1- colspan))))
+ ;; Sanity check for degenerate tables.
+ (when (zerop width)
+ (setq width 10))
(when (or column
(not fill))
- ;; Sanity check for degenerate tables.
- (when (zerop width)
- (setq width 10))
(push (shr-render-td (cdr column) width fill)
tds))
(setq i (1+ i)
@@ -1509,7 +1509,6 @@
(nreverse trs)))
(defun shr-render-td (cont width fill)
- (when (= width 0) (debug))
(with-temp-buffer
(let ((bgcolor (cdr (assq :bgcolor cont)))
(fgcolor (cdr (assq :fgcolor cont)))
@@ -1577,7 +1576,7 @@
(split-string (buffer-string) "\n")
nil
(car actual-colors))
- max)))))
+ (max max 10))))))
(defun shr-buffer-width ()
(goto-char (point-min))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r113723: shr table rendering touch-ups,
Lars Ingebrigtsen <=