* 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
* 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>
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;
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>
;; -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"
(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)