Commit fc2040c0 authored by Karoly Lorentey's avatar Karoly Lorentey
Browse files

Fix --no-wait in emacsclient (reported by Dan Nicolaescu).

* lib-src/emacsclient.c (main): Don't exit prematurely on --no-wait,
  let Emacs close the connection for us.

* lisp/server.el (server-visit-files): Don't set client-record when nowait.

parent 76e9cc50
......@@ -814,11 +814,8 @@ To start the server in Emacs, type \"M-x server-start\".\n",
fflush (out);
fsync (fileno (out));
/* Maybe wait for an answer. */
if (nowait)
if (!eval && !tty)
/* Wait for an answer. */
if (!eval && !tty && !nowait)
printf ("Waiting for Emacs...");
needlf = 2;
......@@ -679,8 +679,8 @@ so don't mark these buffers specially, just visit them normally."
(unless nowait
;; When the buffer is killed, inform the clients.
(add-hook 'kill-buffer-hook 'server-kill-buffer nil t)
(push (car client) server-buffer-clients))
(push (current-buffer) client-record)))
(push (car client) server-buffer-clients)
(push (current-buffer) client-record))))
client 'buffers
(nconc (server-client-get client 'buffers) client-record))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment