summaryrefslogtreecommitdiff
path: root/lib-src/emacsclient.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib-src/emacsclient.c')
-rw-r--r--lib-src/emacsclient.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 9e72ee61144..ea34d5f7b93 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -618,6 +618,7 @@ decode_options (int argc, char **argv)
display in DISPLAY (if any). */
if (create_frame && !tty && !display)
{
+#ifndef HAVE_ANDROID
/* Set these here so we use a default_display only when the user
didn't give us an explicit display. */
#if defined (NS_IMPL_COCOA)
@@ -626,14 +627,22 @@ decode_options (int argc, char **argv)
alt_display = "w32";
#elif defined (HAVE_HAIKU)
alt_display = "be";
-#endif
+#endif /* NS_IMPL_COCOA */
#ifdef HAVE_PGTK
display = egetenv ("WAYLAND_DISPLAY");
alt_display = egetenv ("DISPLAY");
-#else
+#else /* !HAVE_PGTK */
display = egetenv ("DISPLAY");
-#endif
+#endif /* HAVE_PGTK */
+#else /* HAVE_ANDROID */
+ /* Disregard the DISPLAY environment variable under Android.
+ Several terminal emulator programs furnish their own X
+ servers and set DISPLAY, but an Android build is incapable of
+ displaying X frames. */
+ alt_display = NULL;
+ display = "android";
+#endif /* !HAVE_ANDROID */
}
if (!display)