From 9a864fa27d1bdc85c3542d34e6a2fc02fe03c718 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 15 Apr 2012 16:49:24 +0800 Subject: Move "emacsclient -t -n" handling from emacsclient.c to server.el. Fix its buggy logic for the Windows case (regression from 23.4). * lib-src/emacsclient.c (decode_options): Move -t -n corner case handling into server.el. * lisp/server.el (server-process-filter): Handle corner case where both tty and nowait options are present. Fixes: debbugs:11102 --- lisp/server.el | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lisp/server.el') diff --git a/lisp/server.el b/lisp/server.el index 404bebc4747..ced07714dcf 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -1133,6 +1133,13 @@ The following commands are accepted by the client: ;; Unknown command. (arg (error "Unknown command: %s" arg)))) + ;; If both -no-wait and -tty are given with file or sexp + ;; arguments, use an existing frame. + (and nowait + (not (eq tty-name 'window-system)) + (or files commands) + (setq use-current-frame t)) + (setq frame (cond ((and use-current-frame -- cgit v1.2.1