smiley.el (smiley-style): Make the file loadable in batch mode
[gnus] / lisp / smiley.el
index 6381f5b..eb71134 100644 (file)
 
 (defcustom smiley-style
   (if (or (and (fboundp 'face-attribute)
-              (>= (face-attribute 'default :height) 160))
+              ;; In batch mode, attributes can be unspecified.
+              (condition-case nil
+                  (>= (face-attribute 'default :height) 160)
+                (error nil)))
          (and (fboundp 'face-height)
               (>= (face-height 'default) 14)))
       'medium