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: Mon, 10 Nov 2008 19:22:08 +0100

Summary of pending issues in this thread:

 - emacsclient -t causes a crash / assertion error; filed as bug#1325.

 - emacsclient -c causes the same error, because emacsclient thinks
that "-c" + null DISPLAY => "-t"; I proposed the attached patch (1),
because even if -t is supported on Windows, the assumption that an
empty DISPLAY implies a tty frame is false.

 - (make-frame-on-display nil ...) is a synonym of (make-frame ...),
but only on Windows; I proposed patch (2). Does anyone see a problem
with it?

 - Regardless of whether the previous point is accepted or not, the
new behavior should be documented.

   Juanma



Patch (1):

Index: lib-src/emacsclient.c
===================================================================
RCS file: /sources/emacs/emacs/lib-src/emacsclient.c,v
retrieving revision 1.140
diff -u -2 -b -r1.140 emacsclient.c
--- lib-src/emacsclient.c       2 Nov 2008 23:16:33 -0000       1.140
+++ lib-src/emacsclient.c       3 Nov 2008 11:37:19 -0000
@@ -575,7 +575,9 @@
   display = NULL;

+#ifndef WINDOWSNT
 /* If no display is available, new frames are tty frames.  */
 if (!current_frame && !display)
   tty = 1;
+#endif


Patch (2):

Index: lisp/frame.el
===================================================================
RCS file: /cvsroot/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       10 Nov 2008 18:17:48 -0000
@@ -609,4 +609,5 @@
 (defun make-frame-on-display (display &optional parameters)
   "Make a frame on display DISPLAY.
+If DISPLAY is nil, default to the current display.
 The optional argument PARAMETERS specifies additional frame parameters."
   (interactive "sMake frame on display: ")
@@ -617,6 +618,5 @@
         (make-frame `((window-system . ns)
                       (display . ,display) . ,parameters)))
-       ((eq system-type 'windows-nt)
-        ;; On Windows, ignore DISPLAY.
+       ((null display)
         (make-frame parameters))
        (t




reply via email to

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