/* Minibuffer input and completion.
Copyright (C) 1985, 1986, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008 Free Software Foundation, Inc.
+ 2008, 2009 Free Software Foundation, Inc.
This file is part of GNU Emacs.
#include <config.h>
#include <stdio.h>
+#include <setjmp.h>
#include "lisp.h"
#include "commands.h"
build_string ("Command attempted to use minibuffer while in minibuffer"));
}
- if (noninteractive && NILP (Vexecuting_kbd_macro))
+ if ((noninteractive
+ /* In case we are running as a daemon, only do this before
+ detaching from the terminal. */
+ || (IS_DAEMON && (daemon_pipe[1] >= 0)))
+ && NILP (Vexecuting_kbd_macro))
{
val = read_minibuf_noninteractive (map, initial, prompt,
make_number (pos),
Prompt with PROMPT.
Optional second arg DEF is value to return if user enters an empty line.
If DEF is a list of default values, return its first element.
-If optional third arg REQUIRE-MATCH is non-nil,
- only existing buffer names are allowed.
+Optional third arg REQUIRE-MATCH determines whether non-existing
+ buffer names are allowed. It has the same meaning as the
+ REQUIRE-MATCH argument of `confirm-after-completion'.
The argument PROMPT should be a string ending with a colon and a space.
If `read-buffer-completion-ignore-case' is non-nil, completion ignores
case while reading the buffer name.
Additionally to this predicate, `completion-regexp-list'
is used to further constrain the set of candidates.
-If the optional fourth argument HIDE-SPACES is non-nil,
-strings in COLLECTION that start with a space
-are ignored unless STRING itself starts with a space. */)
+An osbolete optional fourth argument HIDE-SPACES is still accepted for
+backward compatibility. If non-nil, strings in COLLECTION that start
+with a space are ignored unless STRING itself starts with a space. */)
(string, collection, predicate, hide_spaces)
Lisp_Object string, collection, predicate, hide_spaces;
{
a valid completion alternative, but Emacs asks for confirmation.
If the value is `confirm-after-completion', the user may exit with an
input that is not a valid completion alternative, but Emacs asks for
- confirmation if the user submitted the input right after
- `minibuffer-complete'. */);
+ confirmation if the user submitted the input right after any of the
+ completion commands listed in `minibuffer-confirm-exit-commands'. */);
Vminibuffer_completion_confirm = Qnil;
DEFVAR_LISP ("minibuffer-completing-file-name",