Commit 2d0e8e61 authored by Chong Yidong's avatar Chong Yidong
Browse files

Fix emacsclient/server behavior under --without-x.

* lib-src/emacsclient.c (main): Send -tty to Emacs under more circumstanced (Bug#8314).

* lisp/server.el (server-process-filter): Only try to open a window
system frame if compiled with graphical support (Bug#8314).

Fixes: debbugs:11102
parent de6ff46d
......@@ -2,6 +2,7 @@
* emacsclient.c (decode_options): Move -t -n corner case handling
into server.el (Bug#11102).
(main): Send -tty to Emacs under more circumstanced (Bug#8314).
2012-04-18 Paul Eggert <eggert@cs.ucla.edu>
......
......@@ -1658,10 +1658,10 @@ main (int argc, char **argv)
send_to_emacs (emacs_socket, " ");
}
/* If using the current frame, send tty information to Emacs anyway.
In daemon mode, Emacs may need to occupy this tty if no other
frame is available. */
if (tty || (current_frame && !eval))
/* Unless we are certain we don't want to occupy the tty, send our
tty information to Emacs. For example, in daemon mode Emacs may
need to occupy this tty if no other frame is available. */
if (!current_frame || !eval)
{
const char *tty_type, *tty_name;
......
......@@ -4,6 +4,8 @@
is a string and there are no files to open (Bug#2825).
(server-create-window-system-frame, server-create-tty-frame):
Don't switch buffers here.
(server-process-filter): Only try to open a window system frame if
compiled with graphical support (Bug#8314).
2012-04-20 Dan Nicolaescu <dann@gnu.org>
......
......@@ -1076,8 +1076,9 @@ The following commands are accepted by the client:
;; -window-system: Open a new X frame.
(`"-window-system"
(setq dontkill t)
(setq tty-name 'window-system))
(if (fboundp 'x-create-frame)
(setq dontkill t
tty-name 'window-system)))
;; -resume: Resume a suspended tty frame.
(`"-resume"
......@@ -1105,7 +1106,8 @@ The following commands are accepted by the client:
(setq dontkill t)
(pop args-left))
;; -tty DEVICE-NAME TYPE: Open a new tty frame at the client.
;; -tty DEVICE-NAME TYPE: Open a new tty frame.
;; (But if we see -window-system later, use that.)
(`"-tty"
(setq tty-name (pop args-left)
tty-type (pop args-left)
......
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