From: Paul Eggert Date: Wed, 9 Mar 2011 06:17:32 +0000 (-0800) Subject: * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font): Rename X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~605^2^2~35 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=071048a3f588c7ae789983bf411a6ea948758abc;p=emacs.git * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font): Rename or move locals to avoid shadowing. --- diff --git a/src/ChangeLog b/src/ChangeLog index f5d452a5dfb..6d22732b5e0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-09 Paul Eggert + * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font): Rename + or move locals to avoid shadowing. + * terminal.c (store_terminal_param): Now static. * 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) { #ifdef HAVE_WINDOW_SYSTEM Lisp_Object tail, frame; - struct frame *f; if (clear_fonts_p || ++clear_font_table_count == CLEAR_FONT_TABLE_COUNT) @@ -875,7 +874,7 @@ clear_face_cache (int clear_fonts_p) /* Clear GCs of realized faces. */ FOR_EACH_FRAME (tail, frame) { - f = XFRAME (frame); + struct frame *f = XFRAME (frame); if (FRAME_WINDOW_P (f)) clear_face_gcs (FRAME_FACE_CACHE (f)); } @@ -1754,14 +1753,14 @@ the WIDTH times as wide as FACE on FRAME. */) /* This is of limited utility since it works with character widths. Keep it for compatibility. --gerd. */ int face_id = lookup_named_face (f, face, 0); - struct face *face = (face_id < 0 - ? NULL - : FACE_FROM_ID (f, face_id)); + struct face *width_face = (face_id < 0 + ? NULL + : FACE_FROM_ID (f, face_id)); - if (face && face->font) + if (width_face && width_face->font) { - size = face->font->pixel_size; - avgwidth = face->font->average_width; + size = width_face->font->pixel_size; + avgwidth = width_face->font->average_width; } else { @@ -3869,19 +3868,19 @@ return the font name used for CHARACTER. */) { struct frame *f = frame_or_selected_frame (frame, 1); int face_id = lookup_named_face (f, face, 1); - struct face *face = FACE_FROM_ID (f, face_id); + struct face *fface = FACE_FROM_ID (f, face_id); - if (! face) + if (! fface) return Qnil; #ifdef HAVE_WINDOW_SYSTEM if (FRAME_WINDOW_P (f) && !NILP (character)) { CHECK_CHARACTER (character); - face_id = FACE_FOR_CHAR (f, face, XINT (character), -1, Qnil); - face = FACE_FROM_ID (f, face_id); + face_id = FACE_FOR_CHAR (f, fface, XINT (character), -1, Qnil); + fface = FACE_FROM_ID (f, face_id); } - return (face->font - ? face->font->props[FONT_NAME_INDEX] + return (fface->font + ? fface->font->props[FONT_NAME_INDEX] : Qnil); #else /* !HAVE_WINDOW_SYSTEM */ return build_string (FRAME_MSDOS_P (f)