From a9051c8850591efe9288c21025ba7a04f4f42aa2 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Mon, 22 Dec 2008 20:45:52 +0000 Subject: [PATCH] (read_minibuf): Follow the non-interactive case when running as a daemon, before detaching. --- src/ChangeLog | 5 +++++ src/minibuf.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 7c7b327f274..e7d44c35b51 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-12-22 Dan Nicolaescu + + * minibuf.c (read_minibuf): Follow the non-interactive case when + running as a daemon, before detaching. + 2008-12-22 Andreas Schwab * buffer.c (init_buffer): Use realloc instead of xrealloc. diff --git a/src/minibuf.c b/src/minibuf.c index e79c7455f3c..694cf4fa1a4 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -525,7 +525,11 @@ read_minibuf (map, initial, prompt, backup_n, expflag, 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), -- 2.39.2