Function: server-create-window-system-frame
server-create-window-system-frame is a byte-compiled function defined
in server.el.gz.
Signature
(server-create-window-system-frame DISPLAY NOWAIT PROC PARENT-ID &optional PARAMETERS)
Source Code
;; Defined in /usr/src/emacs/lisp/server.el.gz
(defun server-create-window-system-frame (display nowait proc parent-id
&optional parameters)
(let* ((display (or display
(frame-parameter nil 'display)
(error "Please specify display")))
(w (or (cdr (assq 'window-system parameters))
(window-system-for-display display))))
;; Special case for ns. This is because DISPLAY may not be set at all
;; which in the ns case isn't an error. The variable display then becomes
;; the fully qualified hostname, which make-frame-on-display below
;; does not understand and throws an error.
;; It may also be a valid X display, but if Emacs is compiled for ns, it
;; can not make X frames.
(if (featurep 'ns-win)
(setq w 'ns display "ns")
;; FIXME! Not sure what this was for, and not sure how it should work
;; in the cl-defmethod new world!
;;(unless (assq w window-system-initialization-alist)
;; (setq w nil))
)
(cond (w
(condition-case nil
(server--create-frame
nowait proc
`((display . ,display)
,@(if parent-id
`((parent-id . ,(string-to-number parent-id))))
,@parameters))
(error
(server-log "Window system unsupported" proc)
(server-send-string proc "-window-system-unsupported \n")
nil)))
(t
(server-log "Window system unsupported" proc)
(server-send-string proc "-window-system-unsupported \n")
nil))))