Fix --no-wait in emacsclient (reported by Dan Nicolaescu).
authorKaroly Lorentey <lorentey@elte.hu>
Sat, 3 Jul 2004 17:53:57 +0000 (17:53 +0000)
committerKaroly Lorentey <lorentey@elte.hu>
Sat, 3 Jul 2004 17:53:57 +0000 (17:53 +0000)
* 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.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-205

lib-src/emacsclient.c
lisp/server.el

index a241a17..888c85e 100644 (file)
@@ -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)
-    return EXIT_SUCCESS;
-
-  if (!eval && !tty)
+  /* Wait for an answer. */
+  if (!eval && !tty && !nowait)
     {
       printf ("Waiting for Emacs...");
       needlf = 2;
index 71db27c..1bf276a 100644 (file)
@@ -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))))
     (server-client-set
      client 'buffers
      (nconc (server-client-get client 'buffers) client-record))))