Mercurial > emacs
changeset 83165:ed82e09208c9
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
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Sat, 03 Jul 2004 17:53:57 +0000 |
parents | e8df1878cfd1 |
children | 1b6966337091 |
files | lib-src/emacsclient.c lisp/server.el |
diffstat | 2 files changed, 4 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/lib-src/emacsclient.c Sat Jul 03 17:01:39 2004 +0000 +++ b/lib-src/emacsclient.c Sat Jul 03 17:53:57 2004 +0000 @@ -814,11 +814,8 @@ 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;
--- a/lisp/server.el Sat Jul 03 17:01:39 2004 +0000 +++ b/lisp/server.el Sat Jul 03 17:53:57 2004 +0000 @@ -679,8 +679,8 @@ (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))))