From: Stefan Monnier Date: Tue, 27 May 2008 00:50:01 +0000 (+0000) Subject: (casify_object): Try to guess better whether the argument is a byte or a char. X-Git-Tag: emacs-pretest-23.0.90~5275 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1fb5aad76f8336192851cfa231a568d062b97ccb;p=emacs.git (casify_object): Try to guess better whether the argument is a byte or a char. --- diff --git a/src/ChangeLog b/src/ChangeLog index 974036d1375..e899db277bf 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,32 +1,34 @@ +2008-05-27 Stefan Monnier + + * casefiddle.c (casify_object): Try to guess better whether the + argument is a byte or a char. + 2008-05-26 Andreas Schwab - * xselect.c (x_reply_selection_request): Properly handle format == - 32. Always send multiples of format size. + * xselect.c (x_reply_selection_request): Properly handle format == 32. + Always send multiples of format size. * xterm.c (x_set_frame_alpha): Fix type mismatch. 2008-05-26 Jason Rumney - * w32font.c (w32font_text_extents): Zero whole metrics struct first. - (compute_metrics): Don't set failure if we just cleared the cache. - (w32_weight_table): Remove unused variable. - (w32_enumfont_pattern_entity): Use FONT_SPACING_CHARCELL for - backwards compatibility. + * w32font.c (w32font_text_extents): Zero whole metrics struct first. + (compute_metrics): Don't set failure if we just cleared the cache. + (w32_weight_table): Remove unused variable. + (w32_enumfont_pattern_entity): Use FONT_SPACING_CHARCELL for + backwards compatibility. 2008-05-25 Kenichi Handa - * w32term.c (x_draw_glyph_string): Fix calculation of underline - position. - - * xterm.c (x_draw_glyph_string): Fix calculation of underline - position. + * w32term.c (x_draw_glyph_string): + * xterm.c (x_draw_glyph_string): Fix calculation of underline position. * xfaces.c: Delete unused function prototypes. (xstrlwr, font_frame): Delete them. (clear_face_cache): Delete unused variable. - * xftfont.c (xftfont_open): Delete unused variable. If - underline_thickness is not 1, adjust underline_position. + * xftfont.c (xftfont_open): Delete unused variable. + If underline_thickness is not 1, adjust underline_position. * ftxfont.c (ftxfont_open): Delete unused variable. @@ -37,7 +39,7 @@ (check_gstring, check_otf_features, otf_list, otf_tag_symbol) (otf_open, font_otf_capability, generate_otf_features) (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor): - Commented out by surrounding "#if 0" and "#endif" for the moment. + Comment out by surrounding "#if 0" and "#endif" for the moment. (Ffont_drive_otf, Ffont_otf_alternates): Likewise. (syms_of_font): Codes for accessing above commented out. diff --git a/src/casefiddle.c b/src/casefiddle.c index af76a77f221..bda49fb3653 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c @@ -57,6 +57,12 @@ casify_object (flag, obj) return obj; c1 = XFASTINT (obj) & ~flagbits; + /* FIXME: Even if enable-multibyte-characters is nil, we may + manipulate multibyte chars. This means we have a bug for latin-1 + chars since when we receive an int 128-255 we can't tell whether + it's an eight-bit byte or a latin-1 char. */ + if (c1 >= 256) + multibyte = 1; if (! multibyte) MAKE_CHAR_MULTIBYTE (c1); c = DOWNCASE (c1);