]> code.delx.au - gnu-emacs/commitdiff
Make backgrounds extend to the end of the lines in shr
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 9 Feb 2016 03:45:22 +0000 (14:45 +1100)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 9 Feb 2016 03:45:22 +0000 (14:45 +1100)
* lisp/net/shr.el (shr-face-background): Faces can also be on
the form `(:background "#fff)' (bug#22547).

lisp/net/shr.el

index bfda6543b686bbc84f164b1f94fded61a0447526..66a9c04a8f6acec01c319529e54334d7d5286b95 100644 (file)
@@ -1786,13 +1786,15 @@ The preference is a float determined from `shr-prefer-media-type'."
 
 (defun shr-face-background (face)
   (and (consp face)
 
 (defun shr-face-background (face)
   (and (consp face)
-       (let ((background nil))
-        (dolist (elem face)
-          (when (and (consp elem)
-                     (eq (car elem) :background))
-            (setq background (cadr elem))))
-        (and background
-             (list :background background)))))
+       (or (and (plist-get face :background)
+                (list :background (plist-get face :background)))
+           (let ((background nil))
+             (dolist (elem face)
+               (when (and (consp elem)
+                          (eq (car elem) :background))
+                 (setq background (cadr elem))))
+             (and background
+                  (list :background background))))))
 
 (defun shr-expand-alignments (start end)
   (while (< (setq start (next-single-property-change
 
 (defun shr-expand-alignments (start end)
   (while (< (setq start (next-single-property-change