]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/gnus/gnus-art.el (gnus--variable-pitch-p): Don't error out if face nil
authorFilipp Gunbin <fgunbin@fastmail.fm>
Thu, 2 Dec 2021 13:15:32 +0000 (16:15 +0300)
committerFilipp Gunbin <fgunbin@fastmail.fm>
Thu, 2 Dec 2021 13:15:32 +0000 (16:15 +0300)
lisp/gnus/gnus-art.el

index 07cb68667f6277d1dd3eb484973d1803c8c9ec44..b7701f10a5e165b085c37702015969e54af3f43e 100644 (file)
@@ -2213,11 +2213,12 @@ unfolded."
          (goto-char (point-max)))))))
 
 (defun gnus--variable-pitch-p (face)
-  (or (eq face 'variable-pitch)
-      (let ((parent (face-attribute face :inherit)))
-        (if (eq parent 'unspecified)
-            nil
-          (seq-some #'gnus--variable-pitch-p (ensure-list parent))))))
+  (when face
+    (or (eq face 'variable-pitch)
+        (let ((parent (face-attribute face :inherit)))
+          (if (eq parent 'unspecified)
+              nil
+            (seq-some #'gnus--variable-pitch-p (ensure-list parent)))))))
 
 (defun gnus-article-treat-fold-headers ()
   "Fold message headers."