diff options
| author | Karoly Lorentey | 2004-07-03 17:53:57 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-07-03 17:53:57 +0000 |
| commit | fc2040c0343bd4579373b83014248a5b5e4f40fd (patch) | |
| tree | c4b182e3535c945edb1f747c89192066f57dc247 | |
| parent | 76e9cc50019f98e12f342574ba0de1eca6631767 (diff) | |
| download | emacs-fc2040c0343bd4579373b83014248a5b5e4f40fd.tar.gz emacs-fc2040c0343bd4579373b83014248a5b5e4f40fd.zip | |
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.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-205
| -rw-r--r-- | lib-src/emacsclient.c | 7 | ||||
| -rw-r--r-- | lisp/server.el | 4 |
2 files changed, 4 insertions, 7 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index a241a17eb60..888c85e8685 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c | |||
| @@ -814,11 +814,8 @@ To start the server in Emacs, type \"M-x server-start\".\n", | |||
| 814 | fflush (out); | 814 | fflush (out); |
| 815 | fsync (fileno (out)); | 815 | fsync (fileno (out)); |
| 816 | 816 | ||
| 817 | /* Maybe wait for an answer. */ | 817 | /* Wait for an answer. */ |
| 818 | if (nowait) | 818 | if (!eval && !tty && !nowait) |
| 819 | return EXIT_SUCCESS; | ||
| 820 | |||
| 821 | if (!eval && !tty) | ||
| 822 | { | 819 | { |
| 823 | printf ("Waiting for Emacs..."); | 820 | printf ("Waiting for Emacs..."); |
| 824 | needlf = 2; | 821 | needlf = 2; |
diff --git a/lisp/server.el b/lisp/server.el index 71db27cc20d..1bf276a26d0 100644 --- a/lisp/server.el +++ b/lisp/server.el | |||
| @@ -679,8 +679,8 @@ so don't mark these buffers specially, just visit them normally." | |||
| 679 | (unless nowait | 679 | (unless nowait |
| 680 | ;; When the buffer is killed, inform the clients. | 680 | ;; When the buffer is killed, inform the clients. |
| 681 | (add-hook 'kill-buffer-hook 'server-kill-buffer nil t) | 681 | (add-hook 'kill-buffer-hook 'server-kill-buffer nil t) |
| 682 | (push (car client) server-buffer-clients)) | 682 | (push (car client) server-buffer-clients) |
| 683 | (push (current-buffer) client-record))) | 683 | (push (current-buffer) client-record)))) |
| 684 | (server-client-set | 684 | (server-client-set |
| 685 | client 'buffers | 685 | client 'buffers |
| 686 | (nconc (server-client-get client 'buffers) client-record)))) | 686 | (nconc (server-client-get client 'buffers) client-record)))) |