diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/xfaces.c | 27 |
2 files changed, 16 insertions, 14 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f5d452a5dfb..6d22732b5e0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2011-03-09 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-03-09 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font): Rename | ||
| 4 | or move locals to avoid shadowing. | ||
| 5 | |||
| 3 | * terminal.c (store_terminal_param): Now static. | 6 | * terminal.c (store_terminal_param): Now static. |
| 4 | 7 | ||
| 5 | * xmenu.c (menu_highlight_callback): Now static. | 8 | * xmenu.c (menu_highlight_callback): Now static. |
diff --git a/src/xfaces.c b/src/xfaces.c index 4cc47c85050..d877d8525dd 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -847,7 +847,6 @@ clear_face_cache (int clear_fonts_p) | |||
| 847 | { | 847 | { |
| 848 | #ifdef HAVE_WINDOW_SYSTEM | 848 | #ifdef HAVE_WINDOW_SYSTEM |
| 849 | Lisp_Object tail, frame; | 849 | Lisp_Object tail, frame; |
| 850 | struct frame *f; | ||
| 851 | 850 | ||
| 852 | if (clear_fonts_p | 851 | if (clear_fonts_p |
| 853 | || ++clear_font_table_count == CLEAR_FONT_TABLE_COUNT) | 852 | || ++clear_font_table_count == CLEAR_FONT_TABLE_COUNT) |
| @@ -875,7 +874,7 @@ clear_face_cache (int clear_fonts_p) | |||
| 875 | /* Clear GCs of realized faces. */ | 874 | /* Clear GCs of realized faces. */ |
| 876 | FOR_EACH_FRAME (tail, frame) | 875 | FOR_EACH_FRAME (tail, frame) |
| 877 | { | 876 | { |
| 878 | f = XFRAME (frame); | 877 | struct frame *f = XFRAME (frame); |
| 879 | if (FRAME_WINDOW_P (f)) | 878 | if (FRAME_WINDOW_P (f)) |
| 880 | clear_face_gcs (FRAME_FACE_CACHE (f)); | 879 | clear_face_gcs (FRAME_FACE_CACHE (f)); |
| 881 | } | 880 | } |
| @@ -1754,14 +1753,14 @@ the WIDTH times as wide as FACE on FRAME. */) | |||
| 1754 | /* This is of limited utility since it works with character | 1753 | /* This is of limited utility since it works with character |
| 1755 | widths. Keep it for compatibility. --gerd. */ | 1754 | widths. Keep it for compatibility. --gerd. */ |
| 1756 | int face_id = lookup_named_face (f, face, 0); | 1755 | int face_id = lookup_named_face (f, face, 0); |
| 1757 | struct face *face = (face_id < 0 | 1756 | struct face *width_face = (face_id < 0 |
| 1758 | ? NULL | 1757 | ? NULL |
| 1759 | : FACE_FROM_ID (f, face_id)); | 1758 | : FACE_FROM_ID (f, face_id)); |
| 1760 | 1759 | ||
| 1761 | if (face && face->font) | 1760 | if (width_face && width_face->font) |
| 1762 | { | 1761 | { |
| 1763 | size = face->font->pixel_size; | 1762 | size = width_face->font->pixel_size; |
| 1764 | avgwidth = face->font->average_width; | 1763 | avgwidth = width_face->font->average_width; |
| 1765 | } | 1764 | } |
| 1766 | else | 1765 | else |
| 1767 | { | 1766 | { |
| @@ -3869,19 +3868,19 @@ return the font name used for CHARACTER. */) | |||
| 3869 | { | 3868 | { |
| 3870 | struct frame *f = frame_or_selected_frame (frame, 1); | 3869 | struct frame *f = frame_or_selected_frame (frame, 1); |
| 3871 | int face_id = lookup_named_face (f, face, 1); | 3870 | int face_id = lookup_named_face (f, face, 1); |
| 3872 | struct face *face = FACE_FROM_ID (f, face_id); | 3871 | struct face *fface = FACE_FROM_ID (f, face_id); |
| 3873 | 3872 | ||
| 3874 | if (! face) | 3873 | if (! fface) |
| 3875 | return Qnil; | 3874 | return Qnil; |
| 3876 | #ifdef HAVE_WINDOW_SYSTEM | 3875 | #ifdef HAVE_WINDOW_SYSTEM |
| 3877 | if (FRAME_WINDOW_P (f) && !NILP (character)) | 3876 | if (FRAME_WINDOW_P (f) && !NILP (character)) |
| 3878 | { | 3877 | { |
| 3879 | CHECK_CHARACTER (character); | 3878 | CHECK_CHARACTER (character); |
| 3880 | face_id = FACE_FOR_CHAR (f, face, XINT (character), -1, Qnil); | 3879 | face_id = FACE_FOR_CHAR (f, fface, XINT (character), -1, Qnil); |
| 3881 | face = FACE_FROM_ID (f, face_id); | 3880 | fface = FACE_FROM_ID (f, face_id); |
| 3882 | } | 3881 | } |
| 3883 | return (face->font | 3882 | return (fface->font |
| 3884 | ? face->font->props[FONT_NAME_INDEX] | 3883 | ? fface->font->props[FONT_NAME_INDEX] |
| 3885 | : Qnil); | 3884 | : Qnil); |
| 3886 | #else /* !HAVE_WINDOW_SYSTEM */ | 3885 | #else /* !HAVE_WINDOW_SYSTEM */ |
| 3887 | return build_string (FRAME_MSDOS_P (f) | 3886 | return build_string (FRAME_MSDOS_P (f) |