diff src/minibuf.c @ 448:3078fd1074e8 r21-2-39

Import from CVS: tag r21-2-39
author cvs
date Mon, 13 Aug 2007 11:38:25 +0200
parents 576fb035e263
children 183866b06e0b
line wrap: on
line diff
--- a/src/minibuf.c	Mon Aug 13 11:37:23 2007 +0200
+++ b/src/minibuf.c	Mon Aug 13 11:38:25 2007 +0200
@@ -618,7 +618,12 @@
 
       if (STRINGP (eltstring)
           && (slength <= XSTRING_CHAR_LENGTH (eltstring))
-          && (0 > scmp (XSTRING_DATA (eltstring),
+          /* Reject alternatives that start with space
+	     unless the input starts with space.  */
+	  && ((XSTRING_CHAR_LENGTH (string) > 0 &&
+	       string_char (XSTRING (string), 0) == ' ')
+	      || string_char (XSTRING (eltstring), 0) != ' ')
+	  && (0 > scmp (XSTRING_DATA (eltstring),
                         XSTRING_DATA (string),
                         slength)))
 	{