diff options
| author | Paul Eggert | 2011-04-11 23:27:22 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-04-11 23:27:22 -0700 |
| commit | 435f4c28d3921770b107973ecb45e36b719eb4c3 (patch) | |
| tree | c7ae1493462b030516236665299a6abe81bcff49 /src | |
| parent | 8524aef308e0fe9955cfab9dc5c41ca62f7865cd (diff) | |
| download | emacs-435f4c28d3921770b107973ecb45e36b719eb4c3.tar.gz emacs-435f4c28d3921770b107973ecb45e36b719eb4c3.zip | |
* xfaces.c: Make symbols static if they're not exported.
* dispextern.h (ascii_face_of_lisp_face, free_realized_face):
Remove decls.
* xterm.h (defined_color): Remove decls.
(x_free_dpy_colors): Declare only if USE_X_TOOLKIT.
* xfaces.c (tty_suppress_bold_inverse_default_colors_p):
(menu_face_changed_default, defined_color, free_realized_face):
(x_free_dpy_colors): Define only if USE_X_TOOLKIT.
(ascii_face_of_lisp_face): Remove; unused.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 10 | ||||
| -rw-r--r-- | src/dispextern.h | 2 | ||||
| -rw-r--r-- | src/xfaces.c | 32 | ||||
| -rw-r--r-- | src/xterm.h | 3 |
4 files changed, 19 insertions, 28 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index dad33d964d7..0e2bcacf3c5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,15 @@ | |||
| 1 | 2011-04-12 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-04-12 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | * xfaces.c: Make symbols static if they're not exported. | ||
| 4 | * dispextern.h (ascii_face_of_lisp_face, free_realized_face): | ||
| 5 | Remove decls. | ||
| 6 | * xterm.h (defined_color): Remove decls. | ||
| 7 | (x_free_dpy_colors): Declare only if USE_X_TOOLKIT. | ||
| 8 | * xfaces.c (tty_suppress_bold_inverse_default_colors_p): | ||
| 9 | (menu_face_changed_default, defined_color, free_realized_face): | ||
| 10 | (x_free_dpy_colors): Define only if USE_X_TOOLKIT. | ||
| 11 | (ascii_face_of_lisp_face): Remove; unused. | ||
| 12 | |||
| 3 | * xdisp.c: Make symbols static if they're not exported. | 13 | * xdisp.c: Make symbols static if they're not exported. |
| 4 | * dispextern.h (scratch_glyph_row, window_box_edges): | 14 | * dispextern.h (scratch_glyph_row, window_box_edges): |
| 5 | (glyph_to_pixel_coords, set_cursor_from_row): | 15 | (glyph_to_pixel_coords, set_cursor_from_row): |
diff --git a/src/dispextern.h b/src/dispextern.h index a7ed24dd320..6d89fe69334 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -3131,7 +3131,6 @@ unsigned long load_color (struct frame *, struct face *, Lisp_Object, | |||
| 3131 | void unload_color (struct frame *, unsigned long); | 3131 | void unload_color (struct frame *, unsigned long); |
| 3132 | char *choose_face_font (struct frame *, Lisp_Object *, Lisp_Object, | 3132 | char *choose_face_font (struct frame *, Lisp_Object *, Lisp_Object, |
| 3133 | int *); | 3133 | int *); |
| 3134 | int ascii_face_of_lisp_face (struct frame *, int); | ||
| 3135 | void prepare_face_for_display (struct frame *, struct face *); | 3134 | void prepare_face_for_display (struct frame *, struct face *); |
| 3136 | int xstrcasecmp (const char *, const char *); | 3135 | int xstrcasecmp (const char *, const char *); |
| 3137 | int lookup_named_face (struct frame *, Lisp_Object, int); | 3136 | int lookup_named_face (struct frame *, Lisp_Object, int); |
| @@ -3157,7 +3156,6 @@ int face_at_string_position (struct window *w, Lisp_Object string, | |||
| 3157 | int merge_faces (struct frame *, Lisp_Object, int, int); | 3156 | int merge_faces (struct frame *, Lisp_Object, int, int); |
| 3158 | int compute_char_face (struct frame *, int, Lisp_Object); | 3157 | int compute_char_face (struct frame *, int, Lisp_Object); |
| 3159 | void free_all_realized_faces (Lisp_Object); | 3158 | void free_all_realized_faces (Lisp_Object); |
| 3160 | void free_realized_face (struct frame *, struct face *); | ||
| 3161 | extern Lisp_Object Qforeground_color, Qbackground_color; | 3159 | extern Lisp_Object Qforeground_color, Qbackground_color; |
| 3162 | extern Lisp_Object Qframe_set_background_mode; | 3160 | extern Lisp_Object Qframe_set_background_mode; |
| 3163 | extern char unspecified_fg[], unspecified_bg[]; | 3161 | extern char unspecified_fg[], unspecified_bg[]; |
diff --git a/src/xfaces.c b/src/xfaces.c index 83f4268ad1e..b09d20c107e 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -425,7 +425,7 @@ int face_change_count; | |||
| 425 | display. This is a kluge to suppress `bold black' foreground text | 425 | display. This is a kluge to suppress `bold black' foreground text |
| 426 | which is hard to read on an LCD monitor. */ | 426 | which is hard to read on an LCD monitor. */ |
| 427 | 427 | ||
| 428 | int tty_suppress_bold_inverse_default_colors_p; | 428 | static int tty_suppress_bold_inverse_default_colors_p; |
| 429 | 429 | ||
| 430 | /* A list of the form `((x . y))' used to avoid consing in | 430 | /* A list of the form `((x . y))' used to avoid consing in |
| 431 | Finternal_set_lisp_face_attribute. */ | 431 | Finternal_set_lisp_face_attribute. */ |
| @@ -443,7 +443,7 @@ static int ngcs; | |||
| 443 | /* Non-zero means the definition of the `menu' face for new frames has | 443 | /* Non-zero means the definition of the `menu' face for new frames has |
| 444 | been changed. */ | 444 | been changed. */ |
| 445 | 445 | ||
| 446 | int menu_face_changed_default; | 446 | static int menu_face_changed_default; |
| 447 | 447 | ||
| 448 | 448 | ||
| 449 | /* Function prototypes. */ | 449 | /* Function prototypes. */ |
| @@ -613,6 +613,8 @@ x_free_colors (struct frame *f, long unsigned int *pixels, int npixels) | |||
| 613 | } | 613 | } |
| 614 | 614 | ||
| 615 | 615 | ||
| 616 | #ifdef USE_X_TOOLKIT | ||
| 617 | |||
| 616 | /* Free colors used on frame F. PIXELS is an array of NPIXELS pixel | 618 | /* Free colors used on frame F. PIXELS is an array of NPIXELS pixel |
| 617 | color values. Interrupt input must be blocked when this function | 619 | color values. Interrupt input must be blocked when this function |
| 618 | is called. */ | 620 | is called. */ |
| @@ -633,7 +635,7 @@ x_free_dpy_colors (Display *dpy, Screen *screen, Colormap cmap, long unsigned in | |||
| 633 | XFreeColors (dpy, cmap, pixels, npixels, 0); | 635 | XFreeColors (dpy, cmap, pixels, npixels, 0); |
| 634 | } | 636 | } |
| 635 | } | 637 | } |
| 636 | 638 | #endif /* USE_X_TOOLKIT */ | |
| 637 | 639 | ||
| 638 | /* Create and return a GC for use on frame F. GC values and mask | 640 | /* Create and return a GC for use on frame F. GC values and mask |
| 639 | are given by XGCV and MASK. */ | 641 | are given by XGCV and MASK. */ |
| @@ -1145,7 +1147,7 @@ tty_defined_color (struct frame *f, const char *color_name, | |||
| 1145 | 1147 | ||
| 1146 | This does the right thing for any type of frame. */ | 1148 | This does the right thing for any type of frame. */ |
| 1147 | 1149 | ||
| 1148 | int | 1150 | static int |
| 1149 | defined_color (struct frame *f, const char *color_name, XColor *color_def, int alloc) | 1151 | defined_color (struct frame *f, const char *color_name, XColor *color_def, int alloc) |
| 1150 | { | 1152 | { |
| 1151 | if (!FRAME_WINDOW_P (f)) | 1153 | if (!FRAME_WINDOW_P (f)) |
| @@ -4091,7 +4093,7 @@ make_realized_face (Lisp_Object *attr) | |||
| 4091 | /* Free realized face FACE, including its X resources. FACE may | 4093 | /* Free realized face FACE, including its X resources. FACE may |
| 4092 | be null. */ | 4094 | be null. */ |
| 4093 | 4095 | ||
| 4094 | void | 4096 | static void |
| 4095 | free_realized_face (struct frame *f, struct face *face) | 4097 | free_realized_face (struct frame *f, struct face *face) |
| 4096 | { | 4098 | { |
| 4097 | if (face) | 4099 | if (face) |
| @@ -4609,26 +4611,6 @@ lookup_basic_face (struct frame *f, int face_id) | |||
| 4609 | } | 4611 | } |
| 4610 | 4612 | ||
| 4611 | 4613 | ||
| 4612 | /* Return the ID of the realized ASCII face of Lisp face with ID | ||
| 4613 | LFACE_ID on frame F. Value is -1 if LFACE_ID isn't valid. */ | ||
| 4614 | |||
| 4615 | int | ||
| 4616 | ascii_face_of_lisp_face (struct frame *f, int lface_id) | ||
| 4617 | { | ||
| 4618 | int face_id; | ||
| 4619 | |||
| 4620 | if (lface_id >= 0 && lface_id < lface_id_to_name_size) | ||
| 4621 | { | ||
| 4622 | Lisp_Object face_name = lface_id_to_name[lface_id]; | ||
| 4623 | face_id = lookup_named_face (f, face_name, 1); | ||
| 4624 | } | ||
| 4625 | else | ||
| 4626 | face_id = -1; | ||
| 4627 | |||
| 4628 | return face_id; | ||
| 4629 | } | ||
| 4630 | |||
| 4631 | |||
| 4632 | /* Return a face for charset ASCII that is like the face with id | 4614 | /* Return a face for charset ASCII that is like the face with id |
| 4633 | FACE_ID on frame F, but has a font that is STEPS steps smaller. | 4615 | FACE_ID on frame F, but has a font that is STEPS steps smaller. |
| 4634 | STEPS < 0 means larger. Value is the id of the face. */ | 4616 | STEPS < 0 means larger. Value is the id of the face. */ |
diff --git a/src/xterm.h b/src/xterm.h index e0e8240e9e8..f44c71fab59 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -1041,7 +1041,6 @@ extern int xg_set_icon_from_xpm_data (struct frame *, const char**); | |||
| 1041 | #endif /* USE_GTK */ | 1041 | #endif /* USE_GTK */ |
| 1042 | 1042 | ||
| 1043 | extern void x_real_positions (struct frame *, int *, int *); | 1043 | extern void x_real_positions (struct frame *, int *, int *); |
| 1044 | extern int defined_color (struct frame *, const char *, XColor *, int); | ||
| 1045 | extern void x_set_border_pixel (struct frame *, int); | 1044 | extern void x_set_border_pixel (struct frame *, int); |
| 1046 | extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); | 1045 | extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); |
| 1047 | extern void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object); | 1046 | extern void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object); |
| @@ -1066,8 +1065,10 @@ extern void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object); | |||
| 1066 | 1065 | ||
| 1067 | /* Defined in xfaces.c */ | 1066 | /* Defined in xfaces.c */ |
| 1068 | 1067 | ||
| 1068 | #ifdef USE_X_TOOLKIT | ||
| 1069 | extern void x_free_dpy_colors (Display *, Screen *, Colormap, | 1069 | extern void x_free_dpy_colors (Display *, Screen *, Colormap, |
| 1070 | unsigned long *, int); | 1070 | unsigned long *, int); |
| 1071 | #endif /* USE_X_TOOLKIT */ | ||
| 1071 | 1072 | ||
| 1072 | /* Defined in xmenu.c */ | 1073 | /* Defined in xmenu.c */ |
| 1073 | 1074 | ||