aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2008-06-10 18:41:01 +0000
committerStefan Monnier2008-06-10 18:41:01 +0000
commit928b5acc5e1e370d98a73d65ea13df4a67a82c4b (patch)
tree8899731a48c162674b64d9fc9ba477cba70f574b
parentce0584934b03b76077f7a59cb2f1fa9550ab9649 (diff)
downloademacs-928b5acc5e1e370d98a73d65ea13df4a67a82c4b.tar.gz
emacs-928b5acc5e1e370d98a73d65ea13df4a67a82c4b.zip
* dired.c (file_name_completion): Don't return t if the match is exact
but with different capitalization. * minibuf.c (Ftry_completion): Simplify.
-rw-r--r--src/ChangeLog4
-rw-r--r--src/dired.c4
-rw-r--r--src/minibuf.c8
3 files changed, 8 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 23189ad9cf9..fe097c2cc41 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
12008-06-10 Stefan Monnier <monnier@iro.umontreal.ca> 12008-06-10 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * dired.c (file_name_completion): Don't return t if the match is exact
4 but with different capitalization.
5 * minibuf.c (Ftry_completion): Simplify.
6
3 * window.c (Vwindow_point_insertion_type): New var. 7 * window.c (Vwindow_point_insertion_type): New var.
4 (set_window_buffer): Use it. 8 (set_window_buffer): Use it.
5 (syms_of_window): Init and export it to Lisp. 9 (syms_of_window): Init and export it to Lisp.
diff --git a/src/dired.c b/src/dired.c
index 7de334bb876..2d82c4bfdc3 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -768,7 +768,9 @@ file_name_completion (file, dirname, all_flag, ver_flag, predicate)
768 768
769 if (all_flag || NILP (bestmatch)) 769 if (all_flag || NILP (bestmatch))
770 return bestmatch; 770 return bestmatch;
771 if (matchcount == 1 && bestmatchsize == SCHARS (file)) 771 /* Return t if the supplied string is an exact match (counting case);
772 it does not require any change to be made. */
773 if (matchcount == 1 && !NILP (Fequal (bestmatch, file)))
772 return Qt; 774 return Qt;
773 bestmatch = Fsubstring (bestmatch, make_number (0), 775 bestmatch = Fsubstring (bestmatch, make_number (0),
774 make_number (bestmatchsize)); 776 make_number (bestmatchsize));
diff --git a/src/minibuf.c b/src/minibuf.c
index 7c22b6b5b99..168c6ab0b26 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -1508,13 +1508,7 @@ is used to further constrain the set of candidates. */)
1508 1508
1509 /* Return t if the supplied string is an exact match (counting case); 1509 /* Return t if the supplied string is an exact match (counting case);
1510 it does not require any change to be made. */ 1510 it does not require any change to be made. */
1511 if (matchcount == 1 && bestmatchsize == SCHARS (string) 1511 if (matchcount == 1 && !NILP (Fequal (bestmatch, string)))
1512 && (tem = Fcompare_strings (bestmatch, make_number (0),
1513 make_number (bestmatchsize),
1514 string, make_number (0),
1515 make_number (bestmatchsize),
1516 Qnil),
1517 EQ (Qt, tem)))
1518 return Qt; 1512 return Qt;
1519 1513
1520 XSETFASTINT (zero, 0); /* Else extract the part in which */ 1514 XSETFASTINT (zero, 0); /* Else extract the part in which */