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
This commit is contained in:
Chong Yidong 2012-04-20 18:37:57 +08:00
parent de6ff46dce
commit 2d0e8e614a
4 changed files with 12 additions and 7 deletions

View file

@ -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;