aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2012-04-20 18:37:57 +0800
committerChong Yidong2012-04-20 18:37:57 +0800
commit2d0e8e614a6744a6a33c6b519f20359802e75c2b (patch)
tree1dfade2f2a21b73ee7f195c6e7e1e2f0a4c43543
parentde6ff46dce80a715d46c34ff46f01a28afb63db9 (diff)
downloademacs-2d0e8e614a6744a6a33c6b519f20359802e75c2b.tar.gz
emacs-2d0e8e614a6744a6a33c6b519f20359802e75c2b.zip
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
-rw-r--r--lib-src/ChangeLog1
-rw-r--r--lib-src/emacsclient.c8
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/server.el8
4 files changed, 12 insertions, 7 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index c76303d8fa2..fc6d905cfb2 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -2,6 +2,7 @@
2 2
3 * emacsclient.c (decode_options): Move -t -n corner case handling 3 * emacsclient.c (decode_options): Move -t -n corner case handling
4 into server.el (Bug#11102). 4 into server.el (Bug#11102).
5 (main): Send -tty to Emacs under more circumstanced (Bug#8314).
5 6
62012-04-18 Paul Eggert <eggert@cs.ucla.edu> 72012-04-18 Paul Eggert <eggert@cs.ucla.edu>
7 8
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 48b4384d487..ea55398306b 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -1658,10 +1658,10 @@ main (int argc, char **argv)
1658 send_to_emacs (emacs_socket, " "); 1658 send_to_emacs (emacs_socket, " ");
1659 } 1659 }
1660 1660
1661 /* If using the current frame, send tty information to Emacs anyway. 1661 /* Unless we are certain we don't want to occupy the tty, send our
1662 In daemon mode, Emacs may need to occupy this tty if no other 1662 tty information to Emacs. For example, in daemon mode Emacs may
1663 frame is available. */ 1663 need to occupy this tty if no other frame is available. */
1664 if (tty || (current_frame && !eval)) 1664 if (!current_frame || !eval)
1665 { 1665 {
1666 const char *tty_type, *tty_name; 1666 const char *tty_type, *tty_name;
1667 1667
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 947ae6f17f6..58f646251d0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -4,6 +4,8 @@
4 is a string and there are no files to open (Bug#2825). 4 is a string and there are no files to open (Bug#2825).
5 (server-create-window-system-frame, server-create-tty-frame): 5 (server-create-window-system-frame, server-create-tty-frame):
6 Don't switch buffers here. 6 Don't switch buffers here.
7 (server-process-filter): Only try to open a window system frame if
8 compiled with graphical support (Bug#8314).
7 9
82012-04-20 Dan Nicolaescu <dann@gnu.org> 102012-04-20 Dan Nicolaescu <dann@gnu.org>
9 11
diff --git a/lisp/server.el b/lisp/server.el
index f9c8ea5c577..1e2f458ac9c 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -1076,8 +1076,9 @@ The following commands are accepted by the client:
1076 1076
1077 ;; -window-system: Open a new X frame. 1077 ;; -window-system: Open a new X frame.
1078 (`"-window-system" 1078 (`"-window-system"
1079 (setq dontkill t) 1079 (if (fboundp 'x-create-frame)
1080 (setq tty-name 'window-system)) 1080 (setq dontkill t
1081 tty-name 'window-system)))
1081 1082
1082 ;; -resume: Resume a suspended tty frame. 1083 ;; -resume: Resume a suspended tty frame.
1083 (`"-resume" 1084 (`"-resume"
@@ -1105,7 +1106,8 @@ The following commands are accepted by the client:
1105 (setq dontkill t) 1106 (setq dontkill t)
1106 (pop args-left)) 1107 (pop args-left))
1107 1108
1108 ;; -tty DEVICE-NAME TYPE: Open a new tty frame at the client. 1109 ;; -tty DEVICE-NAME TYPE: Open a new tty frame.
1110 ;; (But if we see -window-system later, use that.)
1109 (`"-tty" 1111 (`"-tty"
1110 (setq tty-name (pop args-left) 1112 (setq tty-name (pop args-left)
1111 tty-type (pop args-left) 1113 tty-type (pop args-left)