/[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.230 by miles, Thu Nov 15 08:06:06 2001 UTC revision 1.231 by rms, Tue Dec 18 22:49:19 2001 UTC
# Line 1289  is used to further constrain the set of Line 1289  is used to further constrain the set of
1289    XSETFASTINT (end, bestmatchsize);     /* all completions agree */    XSETFASTINT (end, bestmatchsize);     /* all completions agree */
1290    return Fsubstring (bestmatch, zero, end);    return Fsubstring (bestmatch, zero, end);
1291  }  }
   
 /* Compare exactly LEN chars of strings at S1 and S2,  
    ignoring case if appropriate.  
    Return -1 if strings match,  
    else number of chars that match at the beginning.  */  
   
 int  
 scmp (s1, s2, len)  
      register unsigned char *s1, *s2;  
      int len;  
 {  
   register int l = len;  
   
   if (completion_ignore_case)  
     {  
       while (l && DOWNCASE (*s1++) == DOWNCASE (*s2++))  
         l--;  
     }  
   else  
     {  
       while (l && *s1++ == *s2++)  
         l--;  
     }  
   if (l == 0)  
     return -1;  
   else  
     {  
       int match = len - l;  
   
       /* Now *--S1 is the unmatching byte.  If it is in the middle of  
          multi-byte form, we must say that the multi-byte character  
          there doesn't match.  */  
       while (match && *--s1 >= 0xA0) match--;  
       return match;  
     }  
 }  
1292    
1293  DEFUN ("all-completions", Fall_completions, Sall_completions, 2, 4, 0,  DEFUN ("all-completions", Fall_completions, Sall_completions, 2, 4, 0,
1294         doc: /* Search for partial matches to STRING in ALIST.         doc: /* Search for partial matches to STRING in ALIST.

Legend:
Removed from v.1.230  
changed lines
  Added in v.1.231

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