]> code.delx.au - gnu-emacs/blobdiff - lisp/net/shr.el
-
[gnu-emacs] / lisp / net / shr.el
index 567c8b807ff5a5b1857f36688bff715cfeba3ee4..9064b9668f4edcb2ed5acbbe0af095bf843e5fe0 100644 (file)
@@ -1818,13 +1818,15 @@ The preference is a float determined from `shr-prefer-media-type'."
 
 (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