[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/minibuf.c
From: |
Richard M . Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/src/minibuf.c |
Date: |
Sun, 12 Dec 2004 13:27:24 -0500 |
Index: emacs/src/minibuf.c
diff -c emacs/src/minibuf.c:1.277 emacs/src/minibuf.c:1.278
*** emacs/src/minibuf.c:1.277 Sat Dec 11 21:57:50 2004
--- emacs/src/minibuf.c Sun Dec 12 18:15:22 2004
***************
*** 1227,1232 ****
--- 1227,1233 ----
return call3 (alist, string, predicate, Qnil);
bestmatch = bucket = Qnil;
+ zero = make_number (0);
/* If ALIST is not a list, set TAIL just for gc pro. */
tail = alist;
***************
*** 1253,1259 ****
}
else if (type == 2)
{
! if (!EQ (bucket, make_number (0)))
{
elt = bucket;
eltstring = Fsymbol_name (elt);
--- 1254,1260 ----
}
else if (type == 2)
{
! if (!EQ (bucket, zero))
{
elt = bucket;
eltstring = Fsymbol_name (elt);
***************
*** 1285,1300 ****
if (STRINGP (eltstring)
&& SCHARS (string) <= SCHARS (eltstring)
! && (tem = Fcompare_strings (eltstring, make_number (0),
make_number (SCHARS (string)),
! string, make_number (0), Qnil,
completion_ignore_case ? Qt : Qnil),
EQ (Qt, tem)))
{
/* Yes. */
Lisp_Object regexps;
- Lisp_Object zero;
- XSETFASTINT (zero, 0);
/* Ignore this element if it fails to match all the regexps. */
{
--- 1286,1299 ----
if (STRINGP (eltstring)
&& SCHARS (string) <= SCHARS (eltstring)
! && (tem = Fcompare_strings (eltstring, zero,
make_number (SCHARS (string)),
! string, zero, Qnil,
completion_ignore_case ? Qt : Qnil),
EQ (Qt, tem)))
{
/* Yes. */
Lisp_Object regexps;
/* Ignore this element if it fails to match all the regexps. */
{
***************
*** 1348,1356 ****
else
{
compare = min (bestmatchsize, SCHARS (eltstring));
! tem = Fcompare_strings (bestmatch, make_number (0),
make_number (compare),
! eltstring, make_number (0),
make_number (compare),
completion_ignore_case ? Qt : Qnil);
if (EQ (tem, Qt))
--- 1347,1355 ----
else
{
compare = min (bestmatchsize, SCHARS (eltstring));
! tem = Fcompare_strings (bestmatch, zero,
make_number (compare),
! eltstring, zero,
make_number (compare),
completion_ignore_case ? Qt : Qnil);
if (EQ (tem, Qt))
***************
*** 1381,1395 ****
((matchsize == SCHARS (eltstring))
==
(matchsize == SCHARS (bestmatch))
! && (tem = Fcompare_strings (eltstring, make_number (0),
make_number (SCHARS
(string)),
! string, make_number (0),
Qnil,
Qnil),
EQ (Qt, tem))
! && (tem = Fcompare_strings (bestmatch, make_number (0),
make_number (SCHARS
(string)),
! string, make_number (0),
Qnil,
Qnil),
! EQ (Qt, tem))))
--- 1380,1394 ----
((matchsize == SCHARS (eltstring))
==
(matchsize == SCHARS (bestmatch))
! && (tem = Fcompare_strings (eltstring, zero,
make_number (SCHARS
(string)),
! string, zero,
Qnil,
Qnil),
EQ (Qt, tem))
! && (tem = Fcompare_strings (bestmatch, zero,
make_number (SCHARS
(string)),
! string, zero,
Qnil,
Qnil),
! EQ (Qt, tem))))
***************
*** 1476,1488 ****
|| NILP (XCAR (alist))));
int index = 0, obsize = 0;
int bindcount = -1;
! Lisp_Object bucket, tem;
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
CHECK_STRING (string);
if (type == 0)
return call3 (alist, string, predicate, Qt);
allmatches = bucket = Qnil;
/* If ALIST is not a list, set TAIL just for gc pro. */
tail = alist;
--- 1475,1488 ----
|| NILP (XCAR (alist))));
int index = 0, obsize = 0;
int bindcount = -1;
! Lisp_Object bucket, tem, zero;
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
CHECK_STRING (string);
if (type == 0)
return call3 (alist, string, predicate, Qt);
allmatches = bucket = Qnil;
+ zero = make_number (0);
/* If ALIST is not a list, set TAIL just for gc pro. */
tail = alist;
***************
*** 1509,1515 ****
}
else if (type == 2)
{
! if (!EQ (bucket, make_number (0)))
{
elt = bucket;
eltstring = Fsymbol_name (elt);
--- 1509,1515 ----
}
else if (type == 2)
{
! if (!EQ (bucket, zero))
{
elt = bucket;
eltstring = Fsymbol_name (elt);
***************
*** 1547,1555 ****
&& SREF (string, 0) == ' ')
|| SREF (eltstring, 0) != ' '
|| NILP (hide_spaces))
! && (tem = Fcompare_strings (eltstring, make_number (0),
make_number (SCHARS (string)),
! string, make_number (0),
make_number (SCHARS (string)),
completion_ignore_case ? Qt : Qnil),
EQ (Qt, tem)))
--- 1547,1555 ----
&& SREF (string, 0) == ' ')
|| SREF (eltstring, 0) != ' '
|| NILP (hide_spaces))
! && (tem = Fcompare_strings (eltstring, zero,
make_number (SCHARS (string)),
! string, zero,
make_number (SCHARS (string)),
completion_ignore_case ? Qt : Qnil),
EQ (Qt, tem)))