aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiles Bader2000-08-08 16:30:54 +0000
committerMiles Bader2000-08-08 16:30:54 +0000
commit0c80756e779ec25c57818b95619436deba6dd9fd (patch)
tree02096f4a7479f07b806b1cba7353b571629c7190 /src
parentb347b3fd3fbbdd5f009294edd406696889f34329 (diff)
downloademacs-0c80756e779ec25c57818b95619436deba6dd9fd.tar.gz
emacs-0c80756e779ec25c57818b95619436deba6dd9fd.zip
(do_completion): Don't consider a simple change of case as `completion'.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/minibuf.c20
2 files changed, 19 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3a749f95627..d106e3e30a2 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12000-08-09 Miles Bader <miles@lsi.nec.co.jp>
2
3 * minibuf.c (do_completion): Don't consider a simple change of
4 case as `completion'.
5
12000-08-08 Ken Raeburn <raeburn@gnu.org> 62000-08-08 Ken Raeburn <raeburn@gnu.org>
2 7
3 * keyboard.c (syms_of_keyboard): Initialize 8 * keyboard.c (syms_of_keyboard): Initialize
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 @@
1/* Minibuffer input and completion. 1/* Minibuffer input and completion.
2 Copyright (C) 1985, 1986, 1993, 1994, 1995, 1996, 1997, 1998, 1999 2 Copyright (C) 1985, 1986, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
@@ -1574,7 +1574,7 @@ test_completion (txt)
1574int 1574int
1575do_completion () 1575do_completion ()
1576{ 1576{
1577 Lisp_Object completion, tem; 1577 Lisp_Object completion, string, tem;
1578 int completedp; 1578 int completedp;
1579 Lisp_Object last; 1579 Lisp_Object last;
1580 struct gcpro gcpro1, gcpro2; 1580 struct gcpro gcpro1, gcpro2;
@@ -1601,10 +1601,18 @@ do_completion ()
1601 return 1; 1601 return 1;
1602 } 1602 }
1603 1603
1604 /* compiler bug */ 1604 string = Ffield_string (make_number (ZV));
1605 tem = Fstring_equal (completion, Ffield_string(make_number (ZV))); 1605
1606 completedp = NILP (tem); 1606 /* COMPLETEDP should be true if some completion was done, which
1607 if (completedp) 1607 doesn't include simply changing the case of the entered string.
1608 However, for appearance, the string is rewritten if the case
1609 changes. */
1610 tem = Fcompare_strings (completion, Qnil, Qnil, string, Qnil, Qnil, Qt);
1611 completedp = (tem != Qt);
1612
1613 tem = Fstring_equal (completion, string);
1614 if (NILP (tem))
1615 /* Rewrite the user's input. */
1608 { 1616 {
1609 Fdelete_field (make_number (ZV)); /* Some completion happened */ 1617 Fdelete_field (make_number (ZV)); /* Some completion happened */
1610 Finsert (1, &completion); 1618 Finsert (1, &completion);