help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to detect if Emacs is running in a terminal


From: Denis Bueno
Subject: How to detect if Emacs is running in a terminal
Date: Fri, 15 Apr 2005 11:10:33 -0400

Is there some emacs lisp function that I could call to detect whether
the current emacs process is running from within a terminal or not?

I'd like to be able to change my font-lock faces based on whether
emacs is running in a terminal or not. At the moment I deal with this
in the following way.

I have a .emacs-common which contains code that should be loaded
regardless of the emacs interface. My .emacs is of course loaded by
default whenever I run Emacs in a window (not in a terminal). This
contains various font settings and colors used in the windowed Emacs.
I have a .emacs-terminal which contains various font settings and
colors used in the terminal Emacs.

So, when I want to use Emacs in the terminal, I run:

    emacs -nw -q -l ~/.emacs-terminal

Is there a better way?

-- 
Denis Bueno
PGP: http://pgp.mit.edu:11371/pks/lookup?search=0xA1B51B4B&op=index




reply via email to

[Prev in Thread] Current Thread [Next in Thread]