diff options
| author | Lars Ingebrigtsen | 2016-02-09 14:45:22 +1100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-02-09 14:45:22 +1100 |
| commit | a3bf4a387fdc44e5631a6431a2e40e741c672359 (patch) | |
| tree | 3678767be46ec53fb00f188acefef99673ed8d59 | |
| parent | 9935e7cc8ca61bc0852eefe1142e4c8c62416c73 (diff) | |
| download | emacs-a3bf4a387fdc44e5631a6431a2e40e741c672359.tar.gz emacs-a3bf4a387fdc44e5631a6431a2e40e741c672359.zip | |
Make backgrounds extend to the end of the lines in shr
* lisp/net/shr.el (shr-face-background): Faces can also be on
the form `(:background "#fff)' (bug#22547).
| -rw-r--r-- | lisp/net/shr.el | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lisp/net/shr.el b/lisp/net/shr.el index bfda6543b68..66a9c04a8f6 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el | |||
| @@ -1786,13 +1786,15 @@ The preference is a float determined from `shr-prefer-media-type'." | |||
| 1786 | 1786 | ||
| 1787 | (defun shr-face-background (face) | 1787 | (defun shr-face-background (face) |
| 1788 | (and (consp face) | 1788 | (and (consp face) |
| 1789 | (let ((background nil)) | 1789 | (or (and (plist-get face :background) |
| 1790 | (dolist (elem face) | 1790 | (list :background (plist-get face :background))) |
| 1791 | (when (and (consp elem) | 1791 | (let ((background nil)) |
| 1792 | (eq (car elem) :background)) | 1792 | (dolist (elem face) |
| 1793 | (setq background (cadr elem)))) | 1793 | (when (and (consp elem) |
| 1794 | (and background | 1794 | (eq (car elem) :background)) |
| 1795 | (list :background background))))) | 1795 | (setq background (cadr elem)))) |
| 1796 | (and background | ||
| 1797 | (list :background background)))))) | ||
| 1796 | 1798 | ||
| 1797 | (defun shr-expand-alignments (start end) | 1799 | (defun shr-expand-alignments (start end) |
| 1798 | (while (< (setq start (next-single-property-change | 1800 | (while (< (setq start (next-single-property-change |