diff lisp/server.el @ 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 c164c81cba59
children 209a22b247e0
line wrap: on
line diff
--- 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)