]> 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 53c79366264f1c4bf33f85a7c667f0c01c891348..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;
@@ -4692,13 +4694,15 @@ x_update_menu_appearance (f)
        {
 #ifdef USE_MOTIF
          const char *suffix = "List";
+         Bool motif = True;
 #else
          const char *suffix = "";
+         Bool motif = False;
 #endif
-#if defined HAVE_X_I18N && defined USE_MOTIF
+#if defined HAVE_X_I18N
          extern char *xic_create_fontsetname
            P_ ((char *base_fontname, Bool motif));
-         char *fontsetname = xic_create_fontsetname (face->font_name, True);
+         char *fontsetname = xic_create_fontsetname (face->font_name, motif);
 #else
          char *fontsetname = face->font_name;
 #endif
@@ -4709,6 +4713,8 @@ x_update_menu_appearance (f)
                   myname, popup_path, suffix, fontsetname);
          XrmPutLineResource (&rdb, line);
          changed_p = 1;
+         if (fontsetname != face->font_name)
+           xfree (fontsetname);
        }
 
       if (changed_p && f->output_data.x->menubar_widget)
@@ -5771,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;
@@ -5784,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);
@@ -7080,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;
 
@@ -7277,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;
 }
 
 
@@ -7727,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;