summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2004-02-27 14:10:47 +0000
committerKaroly Lorentey <lorentey@elte.hu>2004-02-27 14:10:47 +0000
commit2fc0cf2aefa777e5fe48596e2d43774b28051931 (patch)
treec5826974f491e92ac7e388f65e2a1c09959cc2c3 /lib-src
parentf70dd00951e9a5d0bf301398a991ea2d212ed376 (diff)
Make emacsclient refuse to create a frame inside an Emacs term buffer.
lib-src/emacsclient.c (main): Exit with failure if the terminal type is `eterm' (Emacs term buffer). git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-104
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/emacsclient.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index f41315b1248..c1c8ee8f160 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -588,15 +588,35 @@ To start the server in Emacs, type \"M-x server-start\".\n",
if (tty)
{
char *tty_name = ttyname (fileno (stdin));
+ char *type = getenv ("TERM");
+
if (! tty_name)
- fail ();
+ {
+ fprintf (stderr, "%s: could not get terminal name\n", progname);
+ fail ();
+ }
+
+ if (! type)
+ {
+ fprintf (stderr, "%s: please set the TERM variable to your terminal type\n",
+ progname);
+ fail ();
+ }
+
+ if (! strcmp (type, "eterm"))
+ {
+ /* This causes nasty, MULTI_KBOARD-related input lockouts. */
+ fprintf (stderr, "%s: opening a frame in an Emacs term buffer"
+ " is not supported\n", progname);
+ fail ();
+ }
init_signals ();
fprintf (out, "-tty ");
quote_file_name (tty_name, out);
fprintf (out, " ");
- quote_file_name (getenv("TERM"), out);
+ quote_file_name (type, out);
fprintf (out, " ");
}