Mercurial > emacs
changeset 83064:e7e9448cb3a0
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
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Fri, 27 Feb 2004 14:10:47 +0000 |
parents | 404175b0a47e |
children | a871be7b26a5 |
files | README.multi-tty lib-src/emacsclient.c |
diffstat | 2 files changed, 33 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/README.multi-tty Fri Feb 27 14:05:11 2004 +0000 +++ b/README.multi-tty Fri Feb 27 14:10:47 2004 +0000 @@ -246,13 +246,6 @@ why raw terminal support is broken again. I really do need to understand input.) -** emacsclient -t from an Emacs term buffer does not work, complains - about face problems. This can even lock up Emacs (if the recursive - frame sets single_kboard). Update: the face problems are caused by - bugs in term.el, not in multi-tty. The lockup is caused by - single_kboard mode, and is not easily solvable. The best thing to - do is to simply refuse to create a tty frame of type `eterm'. - ** Maybe standard-display-table should be display-local. DIARY OF CHANGES @@ -663,4 +656,15 @@ narrow_foreground_group. tcsetpgrp blocks if it is called from a process that is not in the same process group as the tty.) +-- emacsclient -t from an Emacs term buffer does not work, complains + about face problems. This can even lock up Emacs (if the recursive + frame sets single_kboard). Update: the face problems are caused by + bugs in term.el, not in multi-tty. The lockup is caused by + single_kboard mode, and is not easily solvable. The best thing to + do is to simply refuse to create a tty frame of type `eterm'. + + (Fixed, changed emacsclient to check for TERM=eterm. The face + complaints seem to be caused by bugs in term.el; they are not + related to multi-tty.) + ;;; arch-tag: 8da1619e-2e79-41a8-9ac9-a0485daad17d
--- a/lib-src/emacsclient.c Fri Feb 27 14:05:11 2004 +0000 +++ b/lib-src/emacsclient.c Fri Feb 27 14:10:47 2004 +0000 @@ -588,15 +588,35 @@ 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, " "); }