diff options
| -rw-r--r-- | lisp/frame.el | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/lisp/frame.el b/lisp/frame.el index e2609ba259d..ddd4aea88b9 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -607,22 +607,26 @@ is not considered (see `next-frame')." | |||
| 607 | (defvar x-display-name) ; term/x-win | 607 | (defvar x-display-name) ; term/x-win |
| 608 | 608 | ||
| 609 | (defun make-frame-on-display (display &optional parameters) | 609 | (defun make-frame-on-display (display &optional parameters) |
| 610 | "Make a frame on X display DISPLAY. | 610 | "Make a frame on display DISPLAY. |
| 611 | The optional second argument PARAMETERS specifies additional frame parameters." | 611 | The optional argument PARAMETERS specifies additional frame parameters." |
| 612 | (interactive "sMake frame on display: ") | 612 | (interactive "sMake frame on display: ") |
| 613 | (if (featurep 'ns) | 613 | (cond ((featurep 'ns) |
| 614 | (progn | 614 | (when (and (boundp 'ns-initialized) (not ns-initialized)) |
| 615 | (when (and (boundp 'ns-initialized) (not ns-initialized)) | 615 | (setq x-display-name display) |
| 616 | (setq x-display-name display) | 616 | (ns-initialize-window-system)) |
| 617 | (ns-initialize-window-system)) | 617 | (make-frame `((window-system . ns) |
| 618 | (make-frame `((window-system . ns) (display . ,display) . ,parameters))) | 618 | (display . ,display) . ,parameters))) |
| 619 | (progn | 619 | ((eq system-type 'windows-nt) |
| 620 | (unless (string-match "\\`[^:]*:[0-9]+\\(\\.[0-9]+\\)?\\'" display) | 620 | ;; On Windows, ignore DISPLAY. |
| 621 | (error "Invalid display, not HOST:SERVER or HOST:SERVER.SCREEN")) | 621 | (make-frame parameters)) |
| 622 | (when (and (boundp 'x-initialized) (not x-initialized)) | 622 | (t |
| 623 | (setq x-display-name display) | 623 | (unless (string-match "\\`[^:]*:[0-9]+\\(\\.[0-9]+\\)?\\'" display) |
| 624 | (x-initialize-window-system)) | 624 | (error "Invalid display, not HOST:SERVER or HOST:SERVER.SCREEN")) |
| 625 | (make-frame `((window-system . x) (display . ,display) . ,parameters))))) | 625 | (when (and (boundp 'x-initialized) (not x-initialized)) |
| 626 | (setq x-display-name display) | ||
| 627 | (x-initialize-window-system)) | ||
| 628 | (make-frame `((window-system . x) | ||
| 629 | (display . ,display) . ,parameters))))) | ||
| 626 | 630 | ||
| 627 | (defun make-frame-on-tty (tty type &optional parameters) | 631 | (defun make-frame-on-tty (tty type &optional parameters) |
| 628 | "Make a frame on terminal device TTY. | 632 | "Make a frame on terminal device TTY. |