aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-04-13 16:22:35 -0700
committerPaul Eggert2011-04-13 16:22:35 -0700
commit239f9db96059f3f76e4b4a6f31f6eb56f642ea84 (patch)
treed37c48bf372a31f9433c35c6128e9401f5335b53 /src
parentdfcf35798287d2483c1136d156e0f692ccea3b18 (diff)
downloademacs-239f9db96059f3f76e4b4a6f31f6eb56f642ea84.tar.gz
emacs-239f9db96059f3f76e4b4a6f31f6eb56f642ea84.zip
* 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.
Diffstat (limited to 'src')
-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 @@
12011-04-13 Paul Eggert <eggert@cs.ucla.edu> 12011-04-13 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 * font.c, fontset.c: Make symbols static if they're not exported.
4 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
5 (FACE_SUITABLE_FOR_CHAR_P): Use it.
6 * font.c (font_close_object): Now static.
7 * font.h (font_close_object): Remove.
8 * fontset.c (FONTSET_OBJLIST): Remove.
9 (free_realized_fontset) #if-0 the body, which does nothing.
10 (face_suitable_for_char_p): #if-0, as it's never called.
11 * fontset.h (face_suitable_for_char_p): Remove decl.
12 * xfaces.c (face_at_string_position): Use
13 FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
14 since 0 is always ASCII.
15
3 * fns.c (weak_hash_tables): Now static. 16 * fns.c (weak_hash_tables): Now static.
4 17
5 * fileio.c: Make symbols static if they're not exported. 18 * 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
1733 1733
1734/* Non-zero if FACE is suitable for displaying character CHAR. */ 1734/* Non-zero if FACE is suitable for displaying character CHAR. */
1735 1735
1736#define FACE_SUITABLE_FOR_ASCII_CHAR_P(FACE, CHAR) \
1737 ((FACE) == (FACE)->ascii_face)
1738
1736#define FACE_SUITABLE_FOR_CHAR_P(FACE, CHAR) \ 1739#define FACE_SUITABLE_FOR_CHAR_P(FACE, CHAR) \
1737 (ASCII_CHAR_P (CHAR) \ 1740 (ASCII_CHAR_P (CHAR) \
1738 ? (FACE) == (FACE)->ascii_face \ 1741 ? FACE_SUITABLE_FOR_ASCII_CHAR_P(FACE) \
1739 : face_suitable_for_char_p ((FACE), (CHAR))) 1742 : face_suitable_for_char_p ((FACE), (CHAR)))
1740 1743
1741/* Return the id of the realized face on frame F that is like the face 1744/* 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)
2872 2872
2873/* Close FONT_OBJECT that is opened on frame F. */ 2873/* Close FONT_OBJECT that is opened on frame F. */
2874 2874
2875void 2875static void
2876font_close_object (FRAME_PTR f, Lisp_Object font_object) 2876font_close_object (FRAME_PTR f, Lisp_Object font_object)
2877{ 2877{
2878 struct font *font = XFONT_OBJECT (font_object); 2878 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);
779 779
780extern Lisp_Object font_open_by_spec (FRAME_PTR f, Lisp_Object spec); 780extern Lisp_Object font_open_by_spec (FRAME_PTR f, Lisp_Object spec);
781extern Lisp_Object font_open_by_name (FRAME_PTR f, const char *name); 781extern Lisp_Object font_open_by_name (FRAME_PTR f, const char *name);
782extern void font_close_object (FRAME_PTR f, Lisp_Object font_object);
783 782
784extern Lisp_Object font_intern_prop (const char *str, int len, int force_symbol); 783extern Lisp_Object font_intern_prop (const char *str, int len, int force_symbol);
785extern void font_update_sort_order (int *order); 784extern 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)
238/* Macros to access special values of (realized) FONTSET. */ 238/* Macros to access special values of (realized) FONTSET. */
239#define FONTSET_BASE(fontset) XCHAR_TABLE (fontset)->extras[2] 239#define FONTSET_BASE(fontset) XCHAR_TABLE (fontset)->extras[2]
240#define FONTSET_FRAME(fontset) XCHAR_TABLE (fontset)->extras[3] 240#define FONTSET_FRAME(fontset) XCHAR_TABLE (fontset)->extras[3]
241#define FONTSET_OBJLIST(fontset) XCHAR_TABLE (fontset)->extras[4] 241/* #define FONTSET_OBJLIST(fontset) XCHAR_TABLE (fontset)->extras[4] */
242#define FONTSET_NOFONT_FACE(fontset) XCHAR_TABLE (fontset)->extras[5] 242#define FONTSET_NOFONT_FACE(fontset) XCHAR_TABLE (fontset)->extras[5]
243/* #define FONTSET_REPERTORY(fontset) XCHAR_TABLE (fontset)->extras[6] */ 243/* #define FONTSET_REPERTORY(fontset) XCHAR_TABLE (fontset)->extras[6] */
244#define FONTSET_DEFAULT(fontset) XCHAR_TABLE (fontset)->extras[7] 244#define FONTSET_DEFAULT(fontset) XCHAR_TABLE (fontset)->extras[7]
@@ -838,6 +838,7 @@ fontset_ascii (int id)
838static void 838static void
839free_realized_fontset (FRAME_PTR f, Lisp_Object fontset) 839free_realized_fontset (FRAME_PTR f, Lisp_Object fontset)
840{ 840{
841#if 0
841 Lisp_Object tail; 842 Lisp_Object tail;
842 843
843 if (0) 844 if (0)
@@ -846,6 +847,7 @@ free_realized_fontset (FRAME_PTR f, Lisp_Object fontset)
846 xassert (FONT_OBJECT_P (XCAR (tail))); 847 xassert (FONT_OBJECT_P (XCAR (tail)));
847 font_close_object (f, XCAR (tail)); 848 font_close_object (f, XCAR (tail));
848 } 849 }
850#endif
849} 851}
850 852
851/* Free fontset of FACE defined on frame F. Called from 853/* Free fontset of FACE defined on frame F. Called from
@@ -881,6 +883,7 @@ free_face_fontset (FRAME_PTR f, struct face *face)
881} 883}
882 884
883 885
886#if 0
884/* Return 1 if FACE is suitable for displaying character C. 887/* Return 1 if FACE is suitable for displaying character C.
885 Otherwise return 0. Called from the macro FACE_SUITABLE_FOR_CHAR_P 888 Otherwise return 0. Called from the macro FACE_SUITABLE_FOR_CHAR_P
886 when C is not an ASCII character. */ 889 when C is not an ASCII character. */
@@ -896,6 +899,7 @@ face_suitable_for_char_p (struct face *face, int c)
896 && INTEGERP (RFONT_DEF_FACE (rfont_def)) 899 && INTEGERP (RFONT_DEF_FACE (rfont_def))
897 && face->id == XINT (RFONT_DEF_FACE (rfont_def))); 900 && face->id == XINT (RFONT_DEF_FACE (rfont_def)));
898} 901}
902#endif
899 903
900 904
901/* Return ID of face suitable for displaying character C on frame F. 905/* 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);
32struct face; 32struct face;
33 33
34extern void free_face_fontset (FRAME_PTR, struct face *); 34extern void free_face_fontset (FRAME_PTR, struct face *);
35extern int face_suitable_for_char_p (struct face *, int);
36extern int face_for_char (FRAME_PTR, struct face *, int, 35extern int face_for_char (FRAME_PTR, struct face *, int,
37 int, Lisp_Object); 36 int, Lisp_Object);
38extern Lisp_Object font_for_char (struct face *, int, int, Lisp_Object); 37extern Lisp_Object font_for_char (struct face *, int, int, Lisp_Object);
@@ -51,4 +50,3 @@ struct font;
51extern int face_for_font (struct frame *, Lisp_Object, struct face *); 50extern int face_for_font (struct frame *, Lisp_Object, struct face *);
52 51
53#endif /* EMACS_FONTSET_H */ 52#endif /* EMACS_FONTSET_H */
54
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,
6179 if we don't have fonts, so we can stop here if not working 6179 if we don't have fonts, so we can stop here if not working
6180 on a window-system frame. */ 6180 on a window-system frame. */
6181 || !FRAME_WINDOW_P (f) 6181 || !FRAME_WINDOW_P (f)
6182 || FACE_SUITABLE_FOR_CHAR_P (base_face, 0))) 6182 || FACE_SUITABLE_FOR_ASCII_CHAR_P (base_face, 0)))
6183 return base_face->id; 6183 return base_face->id;
6184 6184
6185 /* Begin with attributes from the base face. */ 6185 /* Begin with attributes from the base face. */