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: Juanma Barranquero
Subject: Re: emacsclient's option decoding code
Date: Thu, 13 Nov 2008 10:00:53 +0100

On Wed, Nov 12, 2008 at 17:37, Juanma Barranquero <address@hidden> wrote:

OK, let's try to clear somewhat the issues.

About these changes:

>  - Do I change term/w32-win.el to use ":0.0" as argument to 
> `x-open-connection'?
>
>  - If yes, do we leave `make-frame-on-display' as it stands now, i.e.
> accepting any DISPLAY string as valid when called from Windows, or do
> we change it to accept just ":0.0" for the time being? (I favor the
> second, which is simpler and cleaner: it's just removing the recent
> three-line patch by Chong.)

The attached patch uses ":0.0" on Windows (which seems to be the
preferred answer) and *removes* Window-specific code in
`make-frame-on-display' (in fact, it removes also a tiny bit of
X-specific code).

It is still not possible to do "emacsclient -c my-file" on Windows
because of the -c/-t problem, but that will have to wait for some
consensus.

It is OK to install this?

  Juanma


2008-11-13  Juanma Barranquero  <address@hidden>

        * frame.el (make-frame-on-display): Remove Windows-specific hack.
        Pass the current window-system to `make-frame', not a hard-coded `x'.

        * term/w32-win.el (w32-initialize-window-system): Use ":0.0" instead
        of "" to represent the Windows display.


Index: lisp/frame.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/frame.el,v
retrieving revision 1.289
diff -u -2 -r1.289 frame.el
--- lisp/frame.el       7 Nov 2008 14:52:04 -0000       1.289
+++ lisp/frame.el       13 Nov 2008 08:48:28 -0000
@@ -617,7 +617,4 @@
         (make-frame `((window-system . ns)
                       (display . ,display) . ,parameters)))
-       ((eq system-type 'windows-nt)
-        ;; On Windows, ignore DISPLAY.
-        (make-frame parameters))
        (t
         (unless (string-match-p "\\`[^:]*:[0-9]+\\(\\.[0-9]+\\)?\\'" display)
@@ -626,5 +623,5 @@
           (setq x-display-name display)
           (x-initialize-window-system))
-        (make-frame `((window-system . x)
+        (make-frame `((window-system . ,window-system)
                       (display . ,display) . ,parameters)))))

Index: lisp/term/w32-win.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/term/w32-win.el,v
retrieving revision 1.105
diff -u -2 -r1.105 w32-win.el
--- lisp/term/w32-win.el        11 Aug 2008 01:23:07 -0000      1.105
+++ lisp/term/w32-win.el        13 Nov 2008 08:17:25 -0000
@@ -246,5 +246,5 @@
             (replace-regexp-in-string "[.*]" "-" (invocation-name))))

-  (x-open-connection "" x-command-line-resources
+  (x-open-connection ":0.0" x-command-line-resources
                      ;; Exit with a fatal error if this fails and we
                      ;; are the initial display




reply via email to

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