diff options
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/emacsclient.c | 24 |
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", | |||
| 588 | if (tty) | 588 | if (tty) |
| 589 | { | 589 | { |
| 590 | char *tty_name = ttyname (fileno (stdin)); | 590 | char *tty_name = ttyname (fileno (stdin)); |
| 591 | char *type = getenv ("TERM"); | ||
| 592 | |||
| 591 | if (! tty_name) | 593 | if (! tty_name) |
| 592 | fail (); | 594 | { |
| 595 | fprintf (stderr, "%s: could not get terminal name\n", progname); | ||
| 596 | fail (); | ||
| 597 | } | ||
| 598 | |||
| 599 | if (! type) | ||
| 600 | { | ||
| 601 | fprintf (stderr, "%s: please set the TERM variable to your terminal type\n", | ||
| 602 | progname); | ||
| 603 | fail (); | ||
| 604 | } | ||
| 605 | |||
| 606 | if (! strcmp (type, "eterm")) | ||
| 607 | { | ||
| 608 | /* This causes nasty, MULTI_KBOARD-related input lockouts. */ | ||
| 609 | fprintf (stderr, "%s: opening a frame in an Emacs term buffer" | ||
| 610 | " is not supported\n", progname); | ||
| 611 | fail (); | ||
| 612 | } | ||
| 593 | 613 | ||
| 594 | init_signals (); | 614 | init_signals (); |
| 595 | 615 | ||
| 596 | fprintf (out, "-tty "); | 616 | fprintf (out, "-tty "); |
| 597 | quote_file_name (tty_name, out); | 617 | quote_file_name (tty_name, out); |
| 598 | fprintf (out, " "); | 618 | fprintf (out, " "); |
| 599 | quote_file_name (getenv("TERM"), out); | 619 | quote_file_name (type, out); |
| 600 | fprintf (out, " "); | 620 | fprintf (out, " "); |
| 601 | } | 621 | } |
| 602 | 622 | ||