From: Paul Eggert Date: Mon, 13 Jun 2011 02:21:14 +0000 (-0700) Subject: * editfns.c (Ftranslate_region_internal): Use int, not EMACS_INT X-Git-Tag: emacs-pretest-24.0.90~104^2~548^2~37 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=abbd3d23f460e1349d89c2013f39de6265a38790;p=emacs.git * editfns.c (Ftranslate_region_internal): Use int, not EMACS_INT for characters. --- diff --git a/src/ChangeLog b/src/ChangeLog index 9196367d195..ca1e46cc3d6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-06-13 Paul Eggert + * editfns.c (Ftranslate_region_internal): Use int, not EMACS_INT + for characters. + * doc.c (get_doc_string): Omit (unsigned)c that mishandled negatives. * data.c (Faset): If ARRAY is a string, check that NEWELT is a char. diff --git a/src/editfns.c b/src/editfns.c index 81e5917a800..bcf3b751aa9 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -2212,9 +2212,7 @@ general_insert_function (void (*insert_func) len = CHAR_STRING (c, str); else { - str[0] = (ASCII_CHAR_P (c) - ? c - : multibyte_char_to_unibyte (c)); + str[0] = ASCII_CHAR_P (c) ? c : multibyte_char_to_unibyte (c); len = 1; } (*insert_func) ((char *) str, len); @@ -3090,12 +3088,12 @@ It returns the number of characters changed. */) } else { - EMACS_INT c; + int c; nc = oc; val = CHAR_TABLE_REF (table, oc); if (CHARACTERP (val) - && (c = XINT (val), CHAR_VALID_P (c, 0))) + && (c = XFASTINT (val), CHAR_VALID_P (c, 0))) { nc = c; str_len = CHAR_STRING (nc, buf);