aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1993-12-30 07:23:51 +0000
committerRichard M. Stallman1993-12-30 07:23:51 +0000
commit2cbaf88681b857aac11af4a654eb256b52a2a285 (patch)
treefa80f2f8e1b53e7617cc015639fe2e0e34285dbe /src
parent98fb23e2bfb2777ed3b82657979c289f0a5a86c7 (diff)
downloademacs-2cbaf88681b857aac11af4a654eb256b52a2a285.tar.gz
emacs-2cbaf88681b857aac11af4a654eb256b52a2a285.zip
(Fall_completions): Allow completions that start with space
if the input starts with space.
Diffstat (limited to 'src')
-rw-r--r--src/minibuf.c13
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
824 824
825 /* Is this element a possible completion? */ 825 /* Is this element a possible completion? */
826 826
827 if (XTYPE (eltstring) == Lisp_String && 827 if (XTYPE (eltstring) == Lisp_String
828 XSTRING (string)->size <= XSTRING (eltstring)->size && 828 && XSTRING (string)->size <= XSTRING (eltstring)->size
829 XSTRING (eltstring)->data[0] != ' ' && 829 /* Reject alternatives that start with space
830 0 > scmp (XSTRING (eltstring)->data, XSTRING (string)->data, 830 unless the input starts with space. */
831 XSTRING (string)->size)) 831 && ((XSTRING (string)->size > 0 && XSTRING (string)->data[0] == ' ')
832 || XSTRING (eltstring)->data[0] != ' ')
833 && 0 > scmp (XSTRING (eltstring)->data, XSTRING (string)->data,
834 XSTRING (string)->size))
832 { 835 {
833 /* Yes. */ 836 /* Yes. */
834 /* Ignore this element if there is a predicate 837 /* Ignore this element if there is a predicate