Don't insert nil faces in shr

* shr.el (shr-insert-table): Don't add nil faces, because that
will show up in *Messages* as "Invalid face reference: nil [32
times]".
This commit is contained in:
Lars Ingebrigtsen 2016-02-02 05:16:34 +01:00
parent 4c3fae351a
commit cb035f348e

View file

@ -1754,17 +1754,18 @@ The preference is a float determined from `shr-prefer-media-type'."
align))) align)))
(dolist (line lines) (dolist (line lines)
(end-of-line) (end-of-line)
(let ((start (point))) (let ((start (point))
(insert (background (and (> (length line) 0)
line (shr-face-background
(propertize " " (get-text-property
'display `(space :align-to (,pixel-align)) (1- (length line)) 'face line))))
'face (and (> (length line) 0) (space (propertize
(shr-face-background " "
(get-text-property 'display `(space :align-to (,pixel-align))
(1- (length line)) 'face line))) 'shr-table-indent shr-table-id)))
'shr-table-indent shr-table-id) (when background
shr-table-vertical-line) (setq space (propertize space 'face background)))
(insert line space shr-table-vertical-line)
(shr-colorize-region (shr-colorize-region
start (1- (point)) (nth 5 column) (nth 6 column))) start (1- (point)) (nth 5 column) (nth 6 column)))
(forward-line 1)) (forward-line 1))