2015-01-26 Lars Ingebrigtsen <larsi@gnus.org>
* net/shr.el (shr-make-table-1): Fix colspan typo.
+ (shr-make-table-1): Add comments.
* net/eww.el (eww-add-bookmark): Fix prompt and clean up the code
slightly.
;; remaining columns.
(- (length widths) i)))
(dotimes (j (1- colspan))
- (if (> (+ i 1 j) (1- (length widths)))
- (setq width (aref widths (1- (length widths))))
- (setq width (+ width
- shr-table-separator-length
- (aref widths (+ i 1 j))))))
+ (setq width
+ (if (> (+ i 1 j) (1- (length widths)))
+ ;; If we have a colspan spec that's longer
+ ;; than the table is wide, just use the last
+ ;; width as the width.
+ (aref widths (1- (length widths)))
+ ;; Sum up the widths of the columns we're
+ ;; spanning.
+ (+ width
+ shr-table-separator-length
+ (aref widths (+ i 1 j))))))
(setq width-column (+ width-column (1- colspan))))
(when (or column
(not fill))