I'm trying write an APL interpreter that runs in an xterm, or possibly over a dumb-terminal with fewer features. How can I detect if the "terminal" is emacs?
![]() |
0 |
![]() |
On Thursday 22 December 2016 09:58 AM, luser droog wrote: > I'm trying write an APL interpreter that runs in an xterm, > or possibly over a dumb-terminal with fewer features. > How can I detect if the "terminal" is emacs? Here is what I get in various terminal modes in Emacs 24.5.1: *term* $ echo $TERM eterm-color *ansi-term* $ echo $TERM eterm-color *eshell* $ echo $TERM dumb *shell* $ echo $TERM dumb -- Udyant Wig .... the sentiments of men are known, not only by what they receive, but what they reject also ... -- Thomas Jefferson
![]() |
0 |
![]() |
luser droog <mijoryx@yahoo.com> writes: > I'm trying write an APL interpreter that runs in an xterm, > or possibly over a dumb-terminal with fewer features. > How can I detect if the "terminal" is emacs? If you really want to detect emacs and not just the capabilities of the terminal emulator, Emacs sets the environment variable `INSIDE_EMACS' in the subshell to a comma-separated list including the Emacs version. Programs can check this variable to determine whether they are running inside an Emacs subshell. Emacs also sets the `EMACS' environment variable (to `t') if it is not already defined. *Warning:* This environment variable is deprecated. Programs that check this variable should be changed to check `INSIDE_EMACS' instead.
![]() |
0 |
![]() |
On 2016-12-21 20:28, luser droog wrote: > I'm trying write an APL interpreter that runs in an xterm, > or possibly over a dumb-terminal with fewer features. > How can I detect if the "terminal" is emacs? Inspect TERM environment variable. -- Please *no* private Cc: on mailing lists and newsgroups Personal signed mail: please _encrypt_ and sign Don't clear-text sign: http://cr.yp.to/smtp/8bitmime.html
![]() |
0 |
![]() |