# HG changeset patch # User Dan Nicolaescu # Date 1192586855 0 # Node ID 68048ac5712c0a8cfbf66c8a2ce71cc1f9703a1d # Parent a8561916b43eb5fa9104a454b22d8329f43e3542 (server-process-filter): Only set display if X11 is supported. diff -r a8561916b43e -r 68048ac5712c lisp/ChangeLog --- 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 + + * server.el (server-process-filter): Only set display if X11 is + supported. + 2007-10-17 Glenn Morris * progmodes/cc-menus.el (cc-imenu-c++-generic-expression): Tweak diff -r a8561916b43e -r 68048ac5712c lisp/server.el --- 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)