# HG changeset patch # User Miles Bader # Date 965751991 0 # Node ID 8488e2964306070a288585a909be00acd6052278 # Parent 386d91b16514e7d56aaa00692ef29e004ae1182e (do_completion): Don't consider a simple change of case as `completion'. diff -r 386d91b16514 -r 8488e2964306 src/minibuf.c --- a/src/minibuf.c Tue Aug 08 14:45:00 2000 +0000 +++ b/src/minibuf.c Tue Aug 08 16:26:31 2000 +0000 @@ -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 @@ 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 @@ 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);