]> git.eshelyaron.com Git - emacs.git/commitdiff
(server-process-filter): Only set display if X11 is
authorDan Nicolaescu <dann@ics.uci.edu>
Wed, 17 Oct 2007 02:07:35 +0000 (02:07 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Wed, 17 Oct 2007 02:07:35 +0000 (02:07 +0000)
supported.

lisp/ChangeLog
lisp/server.el

index 2ea970016ba4509ecbc169c45408603b8253bb41..6a9fabe415365bbd6a8b2ac70918997b691e5a62 100644 (file)
@@ -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
index 22b947ea9f8bbb6cf415af6a53827c2c9e6c40ef..7d7b001b33fcbdc901bbd7839b207ce22a347f90 100644 (file)
@@ -831,8 +831,12 @@ The following commands are accepted by the client:
                 ;; 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)