comparison src/minibuf.c @ 22038:bc29c7cef66a

(Fall_completions, Ftry_completion): Compare char sizes, not STRING_BYTES.
author Richard M. Stallman <rms@gnu.org>
date Tue, 12 May 1998 20:15:27 +0000
parents 430908755560
children 26a0c01f7551
comparison
equal deleted inserted replaced
22037:cb95bfcd442a 22038:bc29c7cef66a
966 } 966 }
967 967
968 /* Is this element a possible completion? */ 968 /* Is this element a possible completion? */
969 969
970 if (STRINGP (eltstring) 970 if (STRINGP (eltstring)
971 && STRING_BYTES (XSTRING (string)) <= STRING_BYTES (XSTRING (eltstring)) 971 && XSTRING (string)->size <= XSTRING (eltstring)->size
972 && (tem = Fcompare_strings (eltstring, make_number (0), 972 && (tem = Fcompare_strings (eltstring, make_number (0),
973 make_number (XSTRING (string)->size), 973 make_number (XSTRING (string)->size),
974 string, make_number (0), Qnil, 974 string, make_number (0), Qnil,
975 completion_ignore_case ?Qt : Qnil), 975 completion_ignore_case ?Qt : Qnil),
976 EQ (Qt, tem))) 976 EQ (Qt, tem)))
1214 } 1214 }
1215 1215
1216 /* Is this element a possible completion? */ 1216 /* Is this element a possible completion? */
1217 1217
1218 if (STRINGP (eltstring) 1218 if (STRINGP (eltstring)
1219 && STRING_BYTES (XSTRING (string)) <= STRING_BYTES (XSTRING (eltstring)) 1219 && XSTRING (string)->size <= XSTRING (eltstring)->size
1220 /* If HIDE_SPACES, reject alternatives that start with space 1220 /* If HIDE_SPACES, reject alternatives that start with space
1221 unless the input starts with space. */ 1221 unless the input starts with space. */
1222 && ((STRING_BYTES (XSTRING (string)) > 0 1222 && ((STRING_BYTES (XSTRING (string)) > 0
1223 && XSTRING (string)->data[0] == ' ') 1223 && XSTRING (string)->data[0] == ' ')
1224 || XSTRING (eltstring)->data[0] != ' ' 1224 || XSTRING (eltstring)->data[0] != ' '