smiley.el (smiley-style): Make the file loadable in batch mode
authorGlenn Morris <rgm@gnu.org>
Wed, 16 Jan 2013 11:40:48 +0000 (11:40 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 16 Jan 2013 11:40:48 +0000 (11:40 +0000)
lisp/ChangeLog
lisp/smiley.el

index eb6b91c..71f45bf 100644 (file)
@@ -1,3 +1,7 @@
+2013-01-16  Glenn Morris  <rgm@gnu.org>
+
+       * smiley.el (smiley-style): Make the file loadable in batch mode.
+
 2013-01-15  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * nnimap.el (nnimap-keepalive): Don't throw an error if there's no more
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