/* Minibuffer input and completion.
-Copyright (C) 1985-1986, 1993-2015 Free Software Foundation, Inc.
+Copyright (C) 1985-1986, 1993-2016 Free Software Foundation, Inc.
This file is part of GNU Emacs.
GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
#include <binary-io.h>
#include "lisp.h"
-#include "commands.h"
#include "character.h"
#include "buffer.h"
-#include "dispextern.h"
#include "keyboard.h"
#include "frame.h"
#include "window.h"
-#include "syntax.h"
-#include "intervals.h"
#include "keymap.h"
-#include "termhooks.h"
#include "systty.h"
/* List of buffers for use as minibuffers.
if (hide_char)
fprintf (stdout, "%c", hide_char);
if (len == size)
- {
- if (STRING_BYTES_BOUND / 2 < size)
- memory_full (SIZE_MAX);
- size *= 2;
- line = xrealloc (line, size);
- }
+ line = xpalloc (line, &size, 1, -1, sizeof *line);
line[len++] = c;
}
}
Prompt with PROMPT. Whitespace terminates the input. If INITIAL is
non-nil, it should be a string, which is used as initial input, with
point positioned at the end, so that SPACE will accept the input.
-(Actually, INITIAL can also be a cons of a string and an integer.
+\(Actually, INITIAL can also be a cons of a string and an integer.
Such values are treated as in `read-from-minibuffer', but are normally
not useful in this function.)
Third arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits
COLLECTION can be a list of strings, an alist, an obarray or a hash table.
COLLECTION can also be a function to do the completion itself.
PREDICATE limits completion to a subset of COLLECTION.
-See `try-completion' and `all-completions' for more details
- on completion, COLLECTION, and PREDICATE.
+See `try-completion', `all-completions', `test-completion',
+and `completion-boundaries', for more details on completion,
+COLLECTION, and PREDICATE. See also Info nodes `(elisp)Basic Completion'
+for the details about completion, and `(elisp)Programmed Completion' for
+expectations from COLLECTION when it's a function.
REQUIRE-MATCH can take the following values:
- t means that the user is not allowed to exit unless
DEFVAR_BOOL ("enable-recursive-minibuffers", enable_recursive_minibuffers,
doc: /* Non-nil means to allow minibuffer commands while in the minibuffer.
-This variable makes a difference whenever the minibuffer window is active. */);
+This variable makes a difference whenever the minibuffer window is active.
+Also see `minibuffer-depth-indicator-mode', which may be handy if this
+variable is non-nil. */);
enable_recursive_minibuffers = 0;
DEFVAR_LISP ("minibuffer-completion-table", Vminibuffer_completion_table,