emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/src xfaces.c


From: Chong Yidong
Subject: [Emacs-diffs] emacs/src xfaces.c
Date: Thu, 01 Jan 2009 08:09:33 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      09/01/01 08:09:32

Modified files:
        src            : xfaces.c 

Log message:
        (Finternal_set_lisp_face_attribute): Improve error message.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/xfaces.c?cvsroot=emacs&r1=1.423&r2=1.424

Patches:
Index: xfaces.c
===================================================================
RCS file: /sources/emacs/emacs/src/xfaces.c,v
retrieving revision 1.423
retrieving revision 1.424
diff -u -b -r1.423 -r1.424
--- xfaces.c    23 Dec 2008 07:28:08 -0000      1.423
+++ xfaces.c    1 Jan 2009 08:09:32 -0000       1.424
@@ -3046,18 +3046,23 @@
     {
       if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
        {
-         Lisp_Object test;
-
-         test = (EQ (face, Qdefault)
-                 ? value
-                 /* The default face must have an absolute size,
-                    otherwise, we do a test merge with a random
+         if (EQ (face, Qdefault))
+           {
+             /* The default face must have an absolute size.  */
+             if (!INTEGERP (value) || XINT (value) <= 0)
+               signal_error ("Invalid default face height", value);
+           }
+         else
+           {
+             /* For non-default faces, do a test merge with a random
                     height to see if VALUE's ok. */
-                 : merge_face_heights (value, make_number (10), Qnil));
-
+             Lisp_Object test = merge_face_heights (value,
+                                                    make_number (10),
+                                                    Qnil);
          if (!INTEGERP (test) || XINT (test) <= 0)
            signal_error ("Invalid face height", value);
        }
+       }
 
       old_value = LFACE_HEIGHT (lface);
       LFACE_HEIGHT (lface) = value;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]