bagchi@dip.eecs.umich.edu (Ranjan Bagchi) (07/06/90)
How do I set the default font for emacs when I bring it up on an X terminal? Alternately, how does emacs know that it is running in an X environment, so I can write some simple emacs lisp that doesn't hang when I dial in on my vt100? -rj bagchi@eecs.umich.edu
bob@MorningStar.Com (Bob Sutterfield) (07/06/90)
In article <2863@zipeecs.umich.edu> bagchi@dip.eecs.umich.edu (Ranjan Bagchi) writes:
How do I set the default font for emacs when I bring it up on an X
terminal?
My X environment contains some resources like:
*Font: -*-lucidatypewriter-medium-*-*-*-*-120-*-*-*-*-*-*
emacs*BorderWidth: 2
#ifdef COLOR
emacs*Foreground: NavyBlue
emacs*Background: wheat
emacs*Border: sienna
emacs*Cursor: DarkOrchid
emacs*Mouse: orange
#endif
(pretty hideous, huh? you can tell I live in monochrome day-to-day :-)
Emacs supports the following resources:
bodyfont
bitmapicon
borderwidth
internalborder
foregrounddd
background
border
cursor
mouse
reversevideo
Or you could specify the -font switch on the command line.
Alternately, how does emacs know that it is running in an X
environment, so I can write some simple emacs lisp that doesn't
hang when I dial in on my vt100?
The same as any other X application: It looks for the DISPLAY
environment variable or a -d command line switch. To play with fonts
from your LISP code, use (x-set-font). Look at src/x11* and
lisp/term/x*.el for examples.
(... This all assumes you mean GNU Emacs and not some other ...)
himacdon@maytag.uwaterloo.ca (Hamish Macdonald) (07/07/90)
>>>>> In article <BOB.90Jul6101841@volitans.MorningStar.Com>, >>>>> bob@MorningStar.Com (Bob Sutterfield) writes: > Alternately, how does emacs know that it is running in an X > environment, so I can write some simple emacs lisp that doesn't > hang when I dial in on my vt100? Bob> The same as any other X application: It looks for the DISPLAY Bob> environment variable or a -d command line switch. To play with Bob> fonts from your LISP code, use (x-set-font). Look at src/x11* Bob> and lisp/term/x*.el for examples. How about the variable 'window-system which is the symbol 'x if it is running under X, and nil if running on an ordinary terminal. -- -------------------------------------------------------------------- himacdonald@maytag.uwaterloo.ca watmath!maytag!himacdonald "Guns seldom solve any problems; they merely decide whose will shall prevail for the time being." - Brian Jarvis