Path: utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!SUN.COM!peck From: peck@SUN.COM Newsgroups: gnu.emacs Subject: Re: How do I know if I am in Emacstool Message-ID: <8903131908.AA13666@denali.sun.com> Date: 13 Mar 89 19:08:11 GMT References: <2107@titan.sw.mcc.com> Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 21 The next release of emacstool will contain these three lines near the beginning of main in emacstool.c This provides a enviroment variable to inform subprocesses that the input is being filtered through emacstool, and informs the inner process that the emacstool window is indeed a "TERM=sun" window (in case you started it in NeWS or sun-cmd or whatever) Those who care may try this out even now, if you have better suggestions, i'll consider them, too. [send to peck@sun.com, not the whole net] putenv("IN_EMACSTOOL=t"); /* notify subprocess that it is in emacstool */ putenv("TERMCAP="); putenv("TERM=sun"); /* the TTYSW will be a sun terminal * to override these, try % emacstool -rc script */ Also, in .../lisp/term/sun.el add the last lines: ;;; If Emacstool is being nice, and informs us of its presence: (if (getenv "IN_EMACSTOOL") (emacstool-init))