changeset 101397:b4aa70dece55

* emacsclient.c (decode_options): Use a dummy display name under NS/Cocoa.
author Adrian Robert <Adrian.B.Robert@gmail.com>
date Fri, 23 Jan 2009 09:08:03 +0000
parents 6505850d379f
children 6b87429f988f
files lib-src/ChangeLog lib-src/emacsclient.c
diffstat 2 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/ChangeLog	Fri Jan 23 08:00:23 2009 +0000
+++ b/lib-src/ChangeLog	Fri Jan 23 09:08:03 2009 +0000
@@ -1,3 +1,8 @@
+2009-01-23  Adrian Robert  <Adrian.B.Robert@gmail.com>
+
+	* emacsclient.c (decode_options): Use a dummy display name under
+	NS/Cocoa.
+
 2009-01-14  Lars Rasmusson  <lars.rasmusson@gmail.com>  (tiny change)
 
 	* ebrowse.c (matching_regexp): Fix OB1 error.
--- a/lib-src/emacsclient.c	Fri Jan 23 08:00:23 2009 +0000
+++ b/lib-src/emacsclient.c	Fri Jan 23 09:08:03 2009 +0000
@@ -574,7 +574,15 @@
      inconvenient.  So we force users to use "--display $DISPLAY" if
      they want Emacs to connect to their current display.  */
   if (!current_frame && !tty && !display)
-    display = egetenv ("DISPLAY");
+    {
+      display = egetenv ("DISPLAY");
+#ifdef NS_IMPL_COCOA
+      /* Under Cocoa, we don't really use displays the same way as in X,
+         so provide a dummy. */
+      if (!display || strlen (display) == 0)
+        display = "ns";
+#endif
+    }
 
   /* A null-string display is invalid.  */
   if (display && strlen (display) == 0)