changeset 85341:68048ac5712c

(server-process-filter): Only set display if X11 is supported.
author Dan Nicolaescu <dann@ics.uci.edu>
date Wed, 17 Oct 2007 02:07:35 +0000
parents a8561916b43e
children c7526f9a6e15
files lisp/ChangeLog lisp/server.el
diffstat 2 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Oct 17 01:39:18 2007 +0000
+++ b/lisp/ChangeLog	Wed Oct 17 02:07:35 2007 +0000
@@ -1,3 +1,8 @@
+2007-10-17  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* server.el (server-process-filter): Only set display if X11 is
+	supported.
+
 2007-10-17  Glenn Morris  <rgm@gnu.org>
 
 	* progmodes/cc-menus.el (cc-imenu-c++-generic-expression): Tweak
--- a/lisp/server.el	Wed Oct 17 01:39:18 2007 +0000
+++ b/lisp/server.el	Wed Oct 17 02:07:35 2007 +0000
@@ -831,8 +831,12 @@
 		 ;; Open X frames on the given display instead of the default.
 		 ((and (equal "-display" arg)
                        (string-match "\\([^ ]*\\) " request))
-		  (setq display (match-string 1 request)
-			request (substring request (match-end 0))))
+		  ;; Only set `display' if X is supported. 
+		  ;; Emacsclient cannot know if emacs supports X and
+		  ;; it will send -display anyway.
+		  (when (memq 'x frame-creation-function-alist)
+		    (setq display (match-string 1 request)))
+		  (setq request (substring request (match-end 0))))
 
 		 ;; -window-system:  Open a new X frame.
 		 ((equal "-window-system" arg)