emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacsclient's option decoding code


From: Chong Yidong
Subject: Re: emacsclient's option decoding code
Date: Mon, 03 Nov 2008 15:19:42 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> I think it's unclean that the w32 port has make-frame-on-display
> fboundp, but it's dysfunctional when called.  If make-frame-on-display
> can be made to work on Windows, provided that `display' is nil (or
> maybe it should ignore `display' even if non-nil?), that would be a
> cleaner and more general change.

I agree.  Maybe something like this?

*** trunk/lisp/frame.el.~1.287.~        2008-11-03 11:44:19.000000000 -0500
--- trunk/lisp/frame.el 2008-11-03 15:18:41.000000000 -0500
***************
*** 610,628 ****
    "Make a frame on X display DISPLAY.
  The optional second 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)))))
  
  (defun make-frame-on-tty (tty type &optional parameters)
    "Make a frame on terminal device TTY.
--- 610,632 ----
    "Make a frame on X display DISPLAY.
  The optional second argument PARAMETERS specifies additional frame 
parameters."
    (interactive "sMake frame on display: ")
!   (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)
!        ;; 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]