Mercurial > emacs
changeset 5369:409c8dd33f42
(Fall_completions): Allow completions that start with space
if the input starts with space.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 30 Dec 1993 07:23:51 +0000 |
parents | f416b0f85249 |
children | 45ed020959f1 |
files | src/minibuf.c |
diffstat | 1 files changed, 8 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/minibuf.c Thu Dec 30 07:20:56 1993 +0000 +++ b/src/minibuf.c Thu Dec 30 07:23:51 1993 +0000 @@ -824,11 +824,14 @@ /* Is this element a possible completion? */ - if (XTYPE (eltstring) == Lisp_String && - XSTRING (string)->size <= XSTRING (eltstring)->size && - XSTRING (eltstring)->data[0] != ' ' && - 0 > scmp (XSTRING (eltstring)->data, XSTRING (string)->data, - XSTRING (string)->size)) + if (XTYPE (eltstring) == Lisp_String + && XSTRING (string)->size <= XSTRING (eltstring)->size + /* Reject alternatives that start with space + unless the input starts with space. */ + && ((XSTRING (string)->size > 0 && XSTRING (string)->data[0] == ' ') + || XSTRING (eltstring)->data[0] != ' ') + && 0 > scmp (XSTRING (eltstring)->data, XSTRING (string)->data, + XSTRING (string)->size)) { /* Yes. */ /* Ignore this element if there is a predicate