]> code.delx.au - gnu-emacs/blobdiff - src/xfaces.c
(main) [MAC_OS8 || MAC_OSX && HAVE_CARBON]: Call syms_of_macselect.
[gnu-emacs] / src / xfaces.c
index 753b20765d8d9eeca5c616d4cb216988ade7ef2a..5c865be3000898ba451ff511cccd1a7099b379ef 100644 (file)
@@ -3211,6 +3211,7 @@ resolve_face_name (face_name)
      Lisp_Object face_name;
 {
   Lisp_Object aliased;
+  int alias_loop_max = 10;
 
   if (STRINGP (face_name))
     face_name = intern (SDATA (face_name));
@@ -3220,8 +3221,9 @@ resolve_face_name (face_name)
       aliased = Fget (face_name, Qface_alias);
       if (NILP (aliased))
        break;
-      else
-       face_name = aliased;
+      if (--alias_loop_max == 0)
+       break;
+      face_name = aliased;
     }
 
   return face_name;
@@ -5775,7 +5777,7 @@ face_with_height (f, face_id, height)
    is assumed to be already realized.  */
 
 int
-lookup_derived_face (f, symbol, c, face_id)
+lookup_derived_face (f, symbol, c, face_id, signal_p)
      struct frame *f;
      Lisp_Object symbol;
      int c;
@@ -5788,7 +5790,7 @@ lookup_derived_face (f, symbol, c, face_id)
   if (!default_face)
     abort ();
 
-  get_lface_attributes (f, symbol, symbol_attrs, 1);
+  get_lface_attributes (f, symbol, symbol_attrs, signal_p);
   bcopy (default_face->lface, attrs, sizeof attrs);
   merge_face_vectors (f, symbol_attrs, attrs, 0);
   return lookup_face (f, attrs, c, default_face);
@@ -7084,8 +7086,9 @@ realize_x_face (cache, attrs, c, base_face)
      int c;
      struct face *base_face;
 {
+  struct face *face = NULL;
 #ifdef HAVE_WINDOW_SYSTEM
-  struct face *face, *default_face;
+  struct face *default_face;
   struct frame *f;
   Lisp_Object stipple, overline, strike_through, box;
 
@@ -7281,8 +7284,8 @@ realize_x_face (cache, attrs, c, base_face)
     face->stipple = load_pixmap (f, stipple, &face->pixmap_w, &face->pixmap_h);
 
   xassert (FACE_SUITABLE_FOR_CHAR_P (face, c));
-  return face;
 #endif /* HAVE_WINDOW_SYSTEM */
+  return face;
 }
 
 
@@ -7731,7 +7734,7 @@ merge_faces (f, face_name, face_id, base_face_id)
       if (face_id < 0 || face_id >= lface_id_to_name_size)
        return base_face_id;
       face_name = lface_id_to_name[face_id];
-      face_id = lookup_derived_face (f, face_name, 0, base_face_id);
+      face_id = lookup_derived_face (f, face_name, 0, base_face_id, 1);
       if (face_id >= 0)
        return face_id;
       return base_face_id;