diff options
| author | Lars Ingebrigtsen | 2016-02-02 05:16:34 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-02-02 05:16:34 +0100 |
| commit | cb035f348ecee23009461af9ce3aa6f92996684f (patch) | |
| tree | 3e36f5cc19391d46a3e34ee50adbb42bd2c4ea6d | |
| parent | 4c3fae351a6015eef3a672529b0ba9877e16b08b (diff) | |
| download | emacs-cb035f348ecee23009461af9ce3aa6f92996684f.tar.gz emacs-cb035f348ecee23009461af9ce3aa6f92996684f.zip | |
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]".
| -rw-r--r-- | lisp/net/shr.el | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 41c5f95700e..c600c745323 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el | |||
| @@ -1754,17 +1754,18 @@ The preference is a float determined from `shr-prefer-media-type'." | |||
| 1754 | align))) | 1754 | align))) |
| 1755 | (dolist (line lines) | 1755 | (dolist (line lines) |
| 1756 | (end-of-line) | 1756 | (end-of-line) |
| 1757 | (let ((start (point))) | 1757 | (let ((start (point)) |
| 1758 | (insert | 1758 | (background (and (> (length line) 0) |
| 1759 | line | 1759 | (shr-face-background |
| 1760 | (propertize " " | 1760 | (get-text-property |
| 1761 | 'display `(space :align-to (,pixel-align)) | 1761 | (1- (length line)) 'face line)))) |
| 1762 | 'face (and (> (length line) 0) | 1762 | (space (propertize |
| 1763 | (shr-face-background | 1763 | " " |
| 1764 | (get-text-property | 1764 | 'display `(space :align-to (,pixel-align)) |
| 1765 | (1- (length line)) 'face line))) | 1765 | 'shr-table-indent shr-table-id))) |
| 1766 | 'shr-table-indent shr-table-id) | 1766 | (when background |
| 1767 | shr-table-vertical-line) | 1767 | (setq space (propertize space 'face background))) |
| 1768 | (insert line space shr-table-vertical-line) | ||
| 1768 | (shr-colorize-region | 1769 | (shr-colorize-region |
| 1769 | start (1- (point)) (nth 5 column) (nth 6 column))) | 1770 | start (1- (point)) (nth 5 column) (nth 6 column))) |
| 1770 | (forward-line 1)) | 1771 | (forward-line 1)) |