From e7534fc4ed352b0d11dc3426d42f46482ed1353a Mon Sep 17 00:00:00 2001 From: Adrian Robert Date: Fri, 23 Jan 2009 09:08:03 +0000 Subject: [PATCH] * emacsclient.c (decode_options): Use a dummy display name under NS/Cocoa. --- lib-src/ChangeLog | 5 +++++ lib-src/emacsclient.c | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index cbfb6ed2254..92625428b2e 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,8 @@ +2009-01-23 Adrian Robert + + * emacsclient.c (decode_options): Use a dummy display name under + NS/Cocoa. + 2009-01-14 Lars Rasmusson (tiny change) * ebrowse.c (matching_regexp): Fix OB1 error. diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 668be6ce11d..559664f0d45 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -574,7 +574,15 @@ decode_options (argc, argv) 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) -- 2.39.2