/[emacs]/emacs/src/minibuf.c
ViewVC logotype

Diff of /emacs/src/minibuf.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.277 by monnier, Sat Dec 11 21:57:50 2004 UTC revision 1.278 by rms, Sun Dec 12 18:15:22 2004 UTC
# Line 1227  is used to further constrain the set of Line 1227  is used to further constrain the set of
1227      return call3 (alist, string, predicate, Qnil);      return call3 (alist, string, predicate, Qnil);
1228    
1229    bestmatch = bucket = Qnil;    bestmatch = bucket = Qnil;
1230      zero = make_number (0);
1231    
1232    /* If ALIST is not a list, set TAIL just for gc pro.  */    /* If ALIST is not a list, set TAIL just for gc pro.  */
1233    tail = alist;    tail = alist;
# Line 1253  is used to further constrain the set of Line 1254  is used to further constrain the set of
1254          }          }
1255        else if (type == 2)        else if (type == 2)
1256          {          {
1257            if (!EQ (bucket, make_number (0)))            if (!EQ (bucket, zero))
1258              {              {
1259                elt = bucket;                elt = bucket;
1260                eltstring = Fsymbol_name (elt);                eltstring = Fsymbol_name (elt);
# Line 1285  is used to further constrain the set of Line 1286  is used to further constrain the set of
1286    
1287        if (STRINGP (eltstring)        if (STRINGP (eltstring)
1288            && SCHARS (string) <= SCHARS (eltstring)            && SCHARS (string) <= SCHARS (eltstring)
1289            && (tem = Fcompare_strings (eltstring, make_number (0),            && (tem = Fcompare_strings (eltstring, zero,
1290                                        make_number (SCHARS (string)),                                        make_number (SCHARS (string)),
1291                                        string, make_number (0), Qnil,                                        string, zero, Qnil,
1292                                        completion_ignore_case ? Qt : Qnil),                                        completion_ignore_case ? Qt : Qnil),
1293                EQ (Qt, tem)))                EQ (Qt, tem)))
1294          {          {
1295            /* Yes. */            /* Yes. */
1296            Lisp_Object regexps;            Lisp_Object regexps;
           Lisp_Object zero;  
           XSETFASTINT (zero, 0);  
1297    
1298            /* Ignore this element if it fails to match all the regexps.  */            /* Ignore this element if it fails to match all the regexps.  */
1299            {            {
# Line 1348  is used to further constrain the set of Line 1347  is used to further constrain the set of
1347            else            else
1348              {              {
1349                compare = min (bestmatchsize, SCHARS (eltstring));                compare = min (bestmatchsize, SCHARS (eltstring));
1350                tem = Fcompare_strings (bestmatch, make_number (0),                tem = Fcompare_strings (bestmatch, zero,
1351                                        make_number (compare),                                        make_number (compare),
1352                                        eltstring, make_number (0),                                        eltstring, zero,
1353                                        make_number (compare),                                        make_number (compare),
1354                                        completion_ignore_case ? Qt : Qnil);                                        completion_ignore_case ? Qt : Qnil);
1355                if (EQ (tem, Qt))                if (EQ (tem, Qt))
# Line 1381  is used to further constrain the set of Line 1380  is used to further constrain the set of
1380                        ((matchsize == SCHARS (eltstring))                        ((matchsize == SCHARS (eltstring))
1381                         ==                         ==
1382                         (matchsize == SCHARS (bestmatch))                         (matchsize == SCHARS (bestmatch))
1383                         && (tem = Fcompare_strings (eltstring, make_number (0),                         && (tem = Fcompare_strings (eltstring, zero,
1384                                                     make_number (SCHARS (string)),                                                     make_number (SCHARS (string)),
1385                                                     string, make_number (0),                                                     string, zero,
1386                                                     Qnil,                                                     Qnil,
1387                                                     Qnil),                                                     Qnil),
1388                             EQ (Qt, tem))                             EQ (Qt, tem))
1389                         && (tem = Fcompare_strings (bestmatch, make_number (0),                         && (tem = Fcompare_strings (bestmatch, zero,
1390                                                     make_number (SCHARS (string)),                                                     make_number (SCHARS (string)),
1391                                                     string, make_number (0),                                                     string, zero,
1392                                                     Qnil,                                                     Qnil,
1393                                                     Qnil),                                                     Qnil),
1394                             ! EQ (Qt, tem))))                             ! EQ (Qt, tem))))
# Line 1476  are ignored unless STRING itself starts Line 1475  are ignored unless STRING itself starts
1475                             || NILP (XCAR (alist))));                             || NILP (XCAR (alist))));
1476    int index = 0, obsize = 0;    int index = 0, obsize = 0;
1477    int bindcount = -1;    int bindcount = -1;
1478    Lisp_Object bucket, tem;    Lisp_Object bucket, tem, zero;
1479    struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;    struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
1480    
1481    CHECK_STRING (string);    CHECK_STRING (string);
1482    if (type == 0)    if (type == 0)
1483      return call3 (alist, string, predicate, Qt);      return call3 (alist, string, predicate, Qt);
1484    allmatches = bucket = Qnil;    allmatches = bucket = Qnil;
1485      zero = make_number (0);
1486    
1487    /* If ALIST is not a list, set TAIL just for gc pro.  */    /* If ALIST is not a list, set TAIL just for gc pro.  */
1488    tail = alist;    tail = alist;
# Line 1509  are ignored unless STRING itself starts Line 1509  are ignored unless STRING itself starts
1509          }          }
1510        else if (type == 2)        else if (type == 2)
1511          {          {
1512            if (!EQ (bucket, make_number (0)))            if (!EQ (bucket, zero))
1513              {              {
1514                elt = bucket;                elt = bucket;
1515                eltstring = Fsymbol_name (elt);                eltstring = Fsymbol_name (elt);
# Line 1547  are ignored unless STRING itself starts Line 1547  are ignored unless STRING itself starts
1547                 && SREF (string, 0) == ' ')                 && SREF (string, 0) == ' ')
1548                || SREF (eltstring, 0) != ' '                || SREF (eltstring, 0) != ' '
1549                || NILP (hide_spaces))                || NILP (hide_spaces))
1550            && (tem = Fcompare_strings (eltstring, make_number (0),            && (tem = Fcompare_strings (eltstring, zero,
1551                                        make_number (SCHARS (string)),                                        make_number (SCHARS (string)),
1552                                        string, make_number (0),                                        string, zero,
1553                                        make_number (SCHARS (string)),                                        make_number (SCHARS (string)),
1554                                        completion_ignore_case ? Qt : Qnil),                                        completion_ignore_case ? Qt : Qnil),
1555                EQ (Qt, tem)))                EQ (Qt, tem)))

Legend:
Removed from v.1.277  
changed lines
  Added in v.1.278

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26