te07@edrc.cmu.edu (Thomas Epperly) (06/05/89)
I have been trying to change the default font for GNU emacs by adding a line to my ~/.Xdefaults as suggested by the emacs man page. I am running GNU emacs from DECwindows. Below are the lines that I added to the ~/.Xdefaults file, and I tried logging out and login in again after making the additions. emacs.BodyFont: 9x15 emacs.ReverseVideo: on emacs.BitMapIcon: on This had no effect. I tried changing some of the other defaults too, like ReverseVideo and BitMapIcon; and this did not do anything either. I can get the desired font by executing emacs with the -font 9x15 option, but I would like to figure out why what I have tried did not work. Our manuals have not arrived yet, so excuse me if I am asking a stupid question. Please let me know what I am doing wrong or how to do it right. Thanks, Tom Epperly te07@cs.cmu.edu or epperly@chewi.che.wisc.edu --
pinkas@hobbit.intel.com (Israel Pinkas ~) (06/09/89)
In article <5117@pt.cs.cmu.edu> te07@edrc.cmu.edu (Thomas Epperly) writes: > I have been trying to change the default font for GNU emacs by adding a > line to my ~/.Xdefaults as suggested by the emacs man page. I am running > GNU emacs from DECwindows. Below are the lines that I added to the > ~/.Xdefaults file, and I tried logging out and login in again after making > the additions. > > emacs.BodyFont: 9x15 > emacs.ReverseVideo: on > emacs.BitMapIcon: on > > This had no effect. I tried changing some of the other defaults too, like > ReverseVideo and BitMapIcon; and this did not do anything either. I can > get the desired font by executing emacs with the -font 9x15 option, but I > would like to figure out why what I have tried did not work. Our manuals > have not arrived yet, so excuse me if I am asking a stupid question. > Please let me know what I am doing wrong or how to do it right. Since you are on a DS3100, you probably have Ultrix 3.0 or 3.1 with UWS (X11). The X11 version of the GNU Emacs code accepts the following defaults. (This is from x11term.c.) static struct _xdeftab xDefaultsValueTable[] = { { "reverseVideo", "ReverseVideo", &temp_reverseVideo }, { "borderWidth", "BorderWidth", &temp_borderWidth }, { "internalBorder","BorderWidth", &temp_internalBorder }, { "borderColor", "BorderColor", &brdr_color }, { "background", "Background", &back_color }, { "foreground", "Foreground", &fore_color }, { "pointerColor", "Foreground", &mous_color }, { "cursorColor", "Foreground", &curs_color }, { "font", "Font", &temp_font }, { "geometry", "Geometry", &desiredwindow }, { "title", "Title", &XXheader }, { "iconName", "Title", &XXicon_name }, { NULL, NULL, NULL } }; As can be seen, Emacs will look for Font or font. Emasc uses tries the name in the first column, and if the lookup fails, then the name in the second column. For a class name, Emacs uses the default of Emacs, and overrides that with the instance name, which is one of a number of things like argv[0], something names with -rn. etc. See the code for x_term_init in the same file. As an example, here is what I use: Emacs*Background: black Emacs*BorderColor: green Emacs*BorderWidth: 2 Emacs*cursorColor: red Emacs*Font: 9x15 Emacs*Foreground: green Emacs*Geometry: =80x55-0+0 Emacs*internalBorder: 1 Emacs*pointerColor: red Emacs*ReverseVideo: off There is also a lisp function names x-get-default that I have used. Enjoy, -Israel Pinkas -- -------------------------------------- Disclaimer: The above are my personal opinions, and in no way represent the opinions of Intel Corporation. In no way should the above be taken to be a statement of Intel. UUCP: {amdcad,decwrl,hplabs,oliveb,pur-ee,qantel}!intelca!mipos3!cadev4!pinkas ARPA: pinkas%cadev4.intel.com@relay.cs.net CSNET: pinkas@cadev4.intel.com