summaryrefslogtreecommitdiff
path: root/src/minibuf.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2000-08-08 16:30:54 +0000
committerMiles Bader <miles@gnu.org>2000-08-08 16:30:54 +0000
commit0c80756e779ec25c57818b95619436deba6dd9fd (patch)
tree02096f4a7479f07b806b1cba7353b571629c7190 /src/minibuf.c
parentb347b3fd3fbbdd5f009294edd406696889f34329 (diff)
downloademacs-0c80756e779ec25c57818b95619436deba6dd9fd.tar.gz
(do_completion): Don't consider a simple change of case as `completion'.
Diffstat (limited to 'src/minibuf.c')
-rw-r--r--src/minibuf.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/minibuf.c b/src/minibuf.c
index cbc856e62dc..678a750adb7 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -1,5 +1,5 @@
/* Minibuffer input and completion.
- Copyright (C) 1985, 1986, 1993, 1994, 1995, 1996, 1997, 1998, 1999
+ Copyright (C) 1985, 1986, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -1574,7 +1574,7 @@ test_completion (txt)
int
do_completion ()
{
- Lisp_Object completion, tem;
+ Lisp_Object completion, string, tem;
int completedp;
Lisp_Object last;
struct gcpro gcpro1, gcpro2;
@@ -1601,10 +1601,18 @@ do_completion ()
return 1;
}
- /* compiler bug */
- tem = Fstring_equal (completion, Ffield_string(make_number (ZV)));
- completedp = NILP (tem);
- if (completedp)
+ string = Ffield_string (make_number (ZV));
+
+ /* COMPLETEDP should be true if some completion was done, which
+ doesn't include simply changing the case of the entered string.
+ However, for appearance, the string is rewritten if the case
+ changes. */
+ tem = Fcompare_strings (completion, Qnil, Qnil, string, Qnil, Qnil, Qt);
+ completedp = (tem != Qt);
+
+ tem = Fstring_equal (completion, string);
+ if (NILP (tem))
+ /* Rewrite the user's input. */
{
Fdelete_field (make_number (ZV)); /* Some completion happened */
Finsert (1, &completion);