changeset 99377:4e338d810add

(make-frame-on-display): Ignore DISPLAY argument on Windows.
author Chong Yidong <cyd@stupidchicken.com>
date Tue, 04 Nov 2008 16:39:46 +0000
parents 564b3e833f9f
children e2dea54cb619
files lisp/frame.el
diffstat 1 files changed, 19 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/frame.el	Tue Nov 04 16:39:38 2008 +0000
+++ b/lisp/frame.el	Tue Nov 04 16:39:46 2008 +0000
@@ -607,22 +607,26 @@
 (defvar x-display-name)                 ; term/x-win
 
 (defun make-frame-on-display (display &optional parameters)
-  "Make a frame on X display DISPLAY.
-The optional second argument PARAMETERS specifies additional frame parameters."
+  "Make a frame on display DISPLAY.
+The optional argument PARAMETERS specifies additional frame parameters."
   (interactive "sMake frame on display: ")
-  (if (featurep 'ns)
-      (progn
-	(when (and (boundp 'ns-initialized) (not ns-initialized))
-	  (setq x-display-name display)
-	  (ns-initialize-window-system))
-	(make-frame `((window-system . ns) (display . ,display) . ,parameters)))
-    (progn
-      (unless (string-match "\\`[^:]*:[0-9]+\\(\\.[0-9]+\\)?\\'" display)
-	(error "Invalid display, not HOST:SERVER or HOST:SERVER.SCREEN"))
-      (when (and (boundp 'x-initialized) (not x-initialized))
-	(setq x-display-name display)
-	(x-initialize-window-system))
-      (make-frame `((window-system . x) (display . ,display) . ,parameters)))))
+  (cond ((featurep 'ns)
+	 (when (and (boundp 'ns-initialized) (not ns-initialized))
+	   (setq x-display-name display)
+	   (ns-initialize-window-system))
+	 (make-frame `((window-system . ns)
+		       (display . ,display) . ,parameters)))
+	((eq system-type 'windows-nt)
+	 ;; On Windows, ignore DISPLAY.
+	 (make-frame parameters))
+	(t
+	 (unless (string-match "\\`[^:]*:[0-9]+\\(\\.[0-9]+\\)?\\'" display)
+	   (error "Invalid display, not HOST:SERVER or HOST:SERVER.SCREEN"))
+	 (when (and (boundp 'x-initialized) (not x-initialized))
+	   (setq x-display-name display)
+	   (x-initialize-window-system))
+	 (make-frame `((window-system . x)
+		       (display . ,display) . ,parameters)))))
 
 (defun make-frame-on-tty (tty type &optional parameters)
   "Make a frame on terminal device TTY.