#define x_display_info w32_display_info
#define FRAME_X_FONT_TABLE FRAME_W32_FONT_TABLE
#define check_x check_w32
-#define x_list_fonts w32_list_fonts
#define GCGraphicsExposures 0
#endif /* WINDOWSNT */
#define x_display_info ns_display_info
#define FRAME_X_FONT_TABLE FRAME_NS_FONT_TABLE
#define check_x check_ns
-#define x_list_fonts ns_list_fonts
#define GCGraphicsExposures 0
#endif /* HAVE_NS */
static GC x_create_gc P_ ((struct frame *, unsigned long, XGCValues *));
static void x_free_gc P_ ((struct frame *, GC));
-#ifdef WINDOWSNT
-extern Lisp_Object w32_list_fonts P_ ((struct frame *, Lisp_Object, int, int));
-#endif /* WINDOWSNT */
-
-#ifdef HAVE_NS
-extern Lisp_Object ns_list_fonts P_ ((struct frame *, Lisp_Object, int, int));
-#endif /* HAVE_NS */
-
#ifdef USE_X_TOOLKIT
static void x_update_menu_appearance P_ ((struct frame *));
}
if (face->font
+ /* On Solaris 5.8, it's been reported that the `menu' face
+ can be unspecified here, during startup. Why this
+ happens remains unknown. -- cyd */
+ && FONTP (LFACE_FONT (lface))
&& (!UNSPECIFIEDP (LFACE_FAMILY (lface))
|| !UNSPECIFIEDP (LFACE_FOUNDRY (lface))
|| !UNSPECIFIEDP (LFACE_SWIDTH (lface))
if (!default_face)
abort ();
- get_lface_attributes (f, symbol, symbol_attrs, signal_p, 0);
+ if (!get_lface_attributes (f, symbol, symbol_attrs, signal_p, 0))
+ return -1;
+
bcopy (default_face->lface, attrs, sizeof attrs);
merge_face_vectors (f, symbol_attrs, attrs, 0);
return lookup_face (f, attrs);
(alist)
Lisp_Object alist;
{
- Lisp_Object tail, tail2;
+ Lisp_Object entry, tail, tail2;
CHECK_LIST (alist);
alist = Fcopy_sequence (alist);
for (tail = alist; CONSP (tail); tail = XCDR (tail))
- for (tail2 = XCAR (tail); CONSP (tail2); tail2 = XCDR (tail2))
- XSETCAR (tail2, Fintern (XCAR (tail2), Qnil));
+ {
+ entry = XCAR (tail);
+ CHECK_LIST (entry);
+ entry = Fcopy_sequence (entry);
+ XSETCAR (tail, entry);
+ for (tail2 = entry; CONSP (tail2); tail2 = XCDR (tail2))
+ XSETCAR (tail2, Fintern (XCAR (tail2), Qnil));
+ }
+
Vface_alternative_font_family_alist = alist;
free_all_realized_faces (Qnil);
return alist;
(alist)
Lisp_Object alist;
{
- Lisp_Object tail, tail2;
+ Lisp_Object entry, tail, tail2;
CHECK_LIST (alist);
alist = Fcopy_sequence (alist);
for (tail = alist; CONSP (tail); tail = XCDR (tail))
- for (tail2 = XCAR (tail); CONSP (tail2); tail2 = XCDR (tail2))
- XSETCAR (tail2, Fdowncase (XCAR (tail2)));
+ {
+ entry = XCAR (tail);
+ CHECK_LIST (entry);
+ entry = Fcopy_sequence (entry);
+ XSETCAR (tail, entry);
+ for (tail2 = entry; CONSP (tail2); tail2 = XCDR (tail2))
+ XSETCAR (tail2, Fdowncase (XCAR (tail2)));
+ }
Vface_alternative_font_registry_alist = alist;
free_all_realized_faces (Qnil);
return alist;
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, base_face_id, 1);
- if (face_id >= 0)
- return face_id;
- return base_face_id;
+ /* When called during make-frame, lookup_derived_face may fail
+ if the faces are uninitialized. Don't signal an error. */
+ face_id = lookup_derived_face (f, face_name, base_face_id, 0);
+ return (face_id >= 0 ? face_id : base_face_id);
}
/* Begin with attributes from the base face. */
if (name[num] == '\n')
name[num] = 0;
cmap = Fcons (Fcons (build_string (name),
- make_number ((red << 16) | (green << 8) | blue)),
+#ifdef WINDOWSNT
+ make_number (RGB (red, green, blue))),
+#else
+ make_number ((red << 16) | (green << 8) | blue)),
+#endif
cmap);
}
}