summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog13
-rw-r--r--src/dispextern.h5
-rw-r--r--src/font.c2
-rw-r--r--src/font.h1
-rw-r--r--src/fontset.c6
-rw-r--r--src/fontset.h2
-rw-r--r--src/xfaces.c2
7 files changed, 24 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 8d3318449e7..4c3796dbbf5 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,18 @@
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.
diff --git a/src/dispextern.h b/src/dispextern.h
index 4ad107a7266..d57aaee3e7d 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -1733,9 +1733,12 @@ struct face_cache
/* 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
diff --git a/src/font.c b/src/font.c
index ace1b8442d4..6f27e3b9c67 100644
--- a/src/font.c
+++ b/src/font.c
@@ -2872,7 +2872,7 @@ font_open_entity (FRAME_PTR f, Lisp_Object entity, int pixel_size)
/* 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);
diff --git a/src/font.h b/src/font.h
index efcd56b0365..7b43c2f99e7 100644
--- a/src/font.h
+++ b/src/font.h
@@ -779,7 +779,6 @@ extern void font_done_for_face (FRAME_PTR f, struct face *face);
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);
diff --git a/src/fontset.c b/src/fontset.c
index c8452979eee..5aa65c85110 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -238,7 +238,7 @@ fontset_id_valid_p (int id)
/* 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]
@@ -838,6 +838,7 @@ fontset_ascii (int id)
static void
free_realized_fontset (FRAME_PTR f, Lisp_Object fontset)
{
+#if 0
Lisp_Object tail;
if (0)
@@ -846,6 +847,7 @@ free_realized_fontset (FRAME_PTR f, Lisp_Object fontset)
xassert (FONT_OBJECT_P (XCAR (tail)));
font_close_object (f, XCAR (tail));
}
+#endif
}
/* Free fontset of FACE defined on frame F. Called from
@@ -881,6 +883,7 @@ free_face_fontset (FRAME_PTR f, struct face *face)
}
+#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. */
@@ -896,6 +899,7 @@ face_suitable_for_char_p (struct face *face, int c)
&& 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.
diff --git a/src/fontset.h b/src/fontset.h
index fe2e4fe0ca4..8831f4ce0b7 100644
--- a/src/fontset.h
+++ b/src/fontset.h
@@ -32,7 +32,6 @@ extern void (*check_window_system_func) (void);
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);
@@ -51,4 +50,3 @@ struct font;
extern int face_for_font (struct frame *, Lisp_Object, struct face *);
#endif /* EMACS_FONTSET_H */
-
diff --git a/src/xfaces.c b/src/xfaces.c
index b09d20c107e..6330827b5cc 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -6179,7 +6179,7 @@ face_at_string_position (struct window *w, Lisp_Object string,
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. */