]> git.eshelyaron.com Git - emacs.git/commitdiff
* dired.c (file_name_completion): Don't return t if the match is exact
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 10 Jun 2008 18:41:01 +0000 (18:41 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 10 Jun 2008 18:41:01 +0000 (18:41 +0000)
but with different capitalization.
* minibuf.c (Ftry_completion): Simplify.

src/ChangeLog
src/dired.c
src/minibuf.c

index 23189ad9cf92aa1f178f466e2c3c8f1e8e292d54..fe097c2cc41852911040e2c2e9eb6fb574446446 100644 (file)
@@ -1,5 +1,9 @@
 2008-06-10  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * dired.c (file_name_completion): Don't return t if the match is exact
+       but with different capitalization.
+       * minibuf.c (Ftry_completion): Simplify.
+
        * window.c (Vwindow_point_insertion_type): New var.
        (set_window_buffer): Use it.
        (syms_of_window): Init and export it to Lisp.
index 7de334bb87624a8c5645450e7e49d37dc157bf31..2d82c4bfdc39c8f0ff306573995a544f1d8c87bc 100644 (file)
@@ -768,7 +768,9 @@ file_name_completion (file, dirname, all_flag, ver_flag, predicate)
 
   if (all_flag || NILP (bestmatch))
     return bestmatch;
-  if (matchcount == 1 && bestmatchsize == SCHARS (file))
+  /* Return t if the supplied string is an exact match (counting case);
+     it does not require any change to be made.  */
+  if (matchcount == 1 && !NILP (Fequal (bestmatch, file)))
     return Qt;
   bestmatch = Fsubstring (bestmatch, make_number (0),
                          make_number (bestmatchsize));
index 7c22b6b5b9951c75b0df7280b48bd9d09f0d41d3..168c6ab0b265f7cff53a9392d93efa4fe1303202 100644 (file)
@@ -1508,13 +1508,7 @@ is used to further constrain the set of candidates.  */)
 
   /* Return t if the supplied string is an exact match (counting case);
      it does not require any change to be made.  */
-  if (matchcount == 1 && bestmatchsize == SCHARS (string)
-      && (tem = Fcompare_strings (bestmatch, make_number (0),
-                                 make_number (bestmatchsize),
-                                 string, make_number (0),
-                                 make_number (bestmatchsize),
-                                 Qnil),
-         EQ (Qt, tem)))
+  if (matchcount == 1 && !NILP (Fequal (bestmatch, string)))
     return Qt;
 
   XSETFASTINT (zero, 0);               /* Else extract the part in which */