summaryrefslogtreecommitdiff
path: root/lisp/server.el
diff options
context:
space:
mode:
authorDan Nicolaescu <dann@ics.uci.edu>2007-10-17 02:07:35 +0000
committerDan Nicolaescu <dann@ics.uci.edu>2007-10-17 02:07:35 +0000
commit8a3a4fd35f28f1e14fe871fdc59f8c88993e91ff (patch)
treee05d9bc2ed970c5dc22f7e9376e846276a1713bf /lisp/server.el
parentc49847b9444a5003d2cc4cea31426e53feb2fadf (diff)
downloademacs-8a3a4fd35f28f1e14fe871fdc59f8c88993e91ff.tar.gz
(server-process-filter): Only set display if X11 is
supported.
Diffstat (limited to 'lisp/server.el')
-rw-r--r--lisp/server.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/server.el b/lisp/server.el
index 22b947ea9f8..7d7b001b33f 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -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)