diff options
author | Richard M. Stallman <rms@gnu.org> | 1993-12-30 07:23:51 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1993-12-30 07:23:51 +0000 |
commit | 2cbaf88681b857aac11af4a654eb256b52a2a285 (patch) | |
tree | fa80f2f8e1b53e7617cc015639fe2e0e34285dbe /src/minibuf.c | |
parent | 98fb23e2bfb2777ed3b82657979c289f0a5a86c7 (diff) | |
download | emacs-2cbaf88681b857aac11af4a654eb256b52a2a285.tar.gz |
(Fall_completions): Allow completions that start with space
if the input starts with space.
Diffstat (limited to 'src/minibuf.c')
-rw-r--r-- | src/minibuf.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/minibuf.c b/src/minibuf.c index cbf6970bdbd..82d48a47015 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -824,11 +824,14 @@ The argument given to PREDICATE is the alist element or the symbol from the obar /* 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 |