changeset 99254:8cade16f7427

(main): If using the current frame, send tty information to Emacs in case daemon mode needs to occupy this tty.
author Chong Yidong <cyd@stupidchicken.com>
date Thu, 30 Oct 2008 15:54:38 +0000
parents 5fcebc8cbeea
children fd459753f686
files lib-src/emacsclient.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/emacsclient.c	Thu Oct 30 15:54:31 2008 +0000
+++ b/lib-src/emacsclient.c	Thu Oct 30 15:54:38 2008 +0000
@@ -1437,7 +1437,10 @@
       send_to_emacs (emacs_socket, " ");
     }
 
-  if (tty)
+  /* 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)
     {
       char *type = egetenv ("TERM");
       char *tty_name = NULL;