* dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
(FACE_SUITABLE_FOR_CHAR_P): Use it.
* font.c (font_close_object): Now static.
* font.h (font_close_object): Remove.
* fontset.c (FONTSET_OBJLIST): Remove.
(free_realized_fontset) #if-0 the body, which does nothing.
(face_suitable_for_char_p): #if-0, as it's never called.
* fontset.h (face_suitable_for_char_p): Remove decl.
* xfaces.c (face_at_string_position): Use
FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
since 0 is always ASCII.
2011-04-13 Paul Eggert <eggert@cs.ucla.edu>
+ * font.c, fontset.c: Make symbols static if they're not exported.
+ * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
+ (FACE_SUITABLE_FOR_CHAR_P): Use it.
+ * font.c (font_close_object): Now static.
+ * font.h (font_close_object): Remove.
+ * fontset.c (FONTSET_OBJLIST): Remove.
+ (free_realized_fontset) #if-0 the body, which does nothing.
+ (face_suitable_for_char_p): #if-0, as it's never called.
+ * fontset.h (face_suitable_for_char_p): Remove decl.
+ * xfaces.c (face_at_string_position): Use
+ FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
+ since 0 is always ASCII.
+
* fns.c (weak_hash_tables): Now static.
* fileio.c: Make symbols static if they're not exported.
/* Non-zero if FACE is suitable for displaying character CHAR. */
+#define FACE_SUITABLE_FOR_ASCII_CHAR_P(FACE, CHAR) \
+ ((FACE) == (FACE)->ascii_face)
+
#define FACE_SUITABLE_FOR_CHAR_P(FACE, CHAR) \
(ASCII_CHAR_P (CHAR) \
- ? (FACE) == (FACE)->ascii_face \
+ ? FACE_SUITABLE_FOR_ASCII_CHAR_P(FACE) \
: face_suitable_for_char_p ((FACE), (CHAR)))
/* Return the id of the realized face on frame F that is like the face
/* Close FONT_OBJECT that is opened on frame F. */
-void
+static void
font_close_object (FRAME_PTR f, Lisp_Object font_object)
{
struct font *font = XFONT_OBJECT (font_object);
extern Lisp_Object font_open_by_spec (FRAME_PTR f, Lisp_Object spec);
extern Lisp_Object font_open_by_name (FRAME_PTR f, const char *name);
-extern void font_close_object (FRAME_PTR f, Lisp_Object font_object);
extern Lisp_Object font_intern_prop (const char *str, int len, int force_symbol);
extern void font_update_sort_order (int *order);
/* Macros to access special values of (realized) FONTSET. */
#define FONTSET_BASE(fontset) XCHAR_TABLE (fontset)->extras[2]
#define FONTSET_FRAME(fontset) XCHAR_TABLE (fontset)->extras[3]
-#define FONTSET_OBJLIST(fontset) XCHAR_TABLE (fontset)->extras[4]
+/* #define FONTSET_OBJLIST(fontset) XCHAR_TABLE (fontset)->extras[4] */
#define FONTSET_NOFONT_FACE(fontset) XCHAR_TABLE (fontset)->extras[5]
/* #define FONTSET_REPERTORY(fontset) XCHAR_TABLE (fontset)->extras[6] */
#define FONTSET_DEFAULT(fontset) XCHAR_TABLE (fontset)->extras[7]
static void
free_realized_fontset (FRAME_PTR f, Lisp_Object fontset)
{
+#if 0
Lisp_Object tail;
if (0)
xassert (FONT_OBJECT_P (XCAR (tail)));
font_close_object (f, XCAR (tail));
}
+#endif
}
/* Free fontset of FACE defined on frame F. Called from
}
+#if 0
/* Return 1 if FACE is suitable for displaying character C.
Otherwise return 0. Called from the macro FACE_SUITABLE_FOR_CHAR_P
when C is not an ASCII character. */
&& INTEGERP (RFONT_DEF_FACE (rfont_def))
&& face->id == XINT (RFONT_DEF_FACE (rfont_def)));
}
+#endif
/* Return ID of face suitable for displaying character C on frame F.
struct face;
extern void free_face_fontset (FRAME_PTR, struct face *);
-extern int face_suitable_for_char_p (struct face *, int);
extern int face_for_char (FRAME_PTR, struct face *, int,
int, Lisp_Object);
extern Lisp_Object font_for_char (struct face *, int, int, Lisp_Object);
extern int face_for_font (struct frame *, Lisp_Object, struct face *);
#endif /* EMACS_FONTSET_H */
-
if we don't have fonts, so we can stop here if not working
on a window-system frame. */
|| !FRAME_WINDOW_P (f)
- || FACE_SUITABLE_FOR_CHAR_P (base_face, 0)))
+ || FACE_SUITABLE_FOR_ASCII_CHAR_P (base_face, 0)))
return base_face->id;
/* Begin with attributes from the base face. */