From: Richard M. Stallman Date: Tue, 12 May 1998 20:15:27 +0000 (+0000) Subject: (Fall_completions, Ftry_completion): Compare char sizes, not STRING_BYTES. X-Git-Tag: emacs-20.3~1039 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7d3159862ce14bf1f202982f7d31f1c76ba00e25;p=emacs.git (Fall_completions, Ftry_completion): Compare char sizes, not STRING_BYTES. --- diff --git a/src/minibuf.c b/src/minibuf.c index 2e89c610564..f69f06f5ec9 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -968,7 +968,7 @@ or the symbol from the obarray.") /* Is this element a possible completion? */ if (STRINGP (eltstring) - && STRING_BYTES (XSTRING (string)) <= STRING_BYTES (XSTRING (eltstring)) + && XSTRING (string)->size <= XSTRING (eltstring)->size && (tem = Fcompare_strings (eltstring, make_number (0), make_number (XSTRING (string)->size), string, make_number (0), Qnil, @@ -1216,7 +1216,7 @@ are ignored unless STRING itself starts with a space.") /* Is this element a possible completion? */ if (STRINGP (eltstring) - && STRING_BYTES (XSTRING (string)) <= STRING_BYTES (XSTRING (eltstring)) + && XSTRING (string)->size <= XSTRING (eltstring)->size /* If HIDE_SPACES, reject alternatives that start with space unless the input starts with space. */ && ((STRING_BYTES (XSTRING (string)) > 0