From: Noam Postavsky Date: Tue, 24 Jul 2018 01:01:01 +0000 (-0400) Subject: Fix emacsclient check for term.el buffer (Bug#21041) X-Git-Tag: emacs-26.1.90~216 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5afbf62674e741b06c01216fe37a5439e9d42307;p=emacs.git Fix emacsclient check for term.el buffer (Bug#21041) * lib-src/emacsclient.c (find_tty): Check for any TERM value with prefix of "eterm", not just "eterm" itself. Also check for ",term:" in INSIDE_EMACS value. --- diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index b139b2fe3f6..b0243f99c26 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -1114,7 +1114,9 @@ find_tty (const char **tty_type, const char **tty_name, int noabort) } } - if (strcmp (type, "eterm") == 0) + const char *inside_emacs = egetenv ("INSIDE_EMACS"); + if (inside_emacs && strstr (inside_emacs, ",term:") + && strprefix ("eterm", type)) { if (noabort) return 0;