Subject: Re: bug#2147: Default font in Emacs

From: Stefan Monnier <[email-masked]>
Date: Mon, 02 Feb 2009 10:38:00 -0500

> Because I prefer the FreeMono font to the default font provided, I
> tweak it in my ~/.emacs like this:
 
>   (let ((font (cond ((eq window-system 'w32)
>                       "-outline-courier new-normal-r-normal-normal-16-120-96-96-c-*-fontset-auto2"
>                      )
>                      ((eq window-system 'x)
>                       "FreeMono-13"
>                      ))))
>     (set-default-font font)
>     (add-to-list 'default-frame-alist `(font . ,font)))
 
> When I start emacs as a daemon:
 
>   $ emacs --daemon
 
> The cons cell added to `default-frame-alist' seems to be '(font
> . nil). This causes a segfault when running `emacsclient -c':
 
Emacs just does what you told him to.  The same problem happens if you
start "emacs -nw" and then M-x make-frame-on-display.
In both cases `window-system' is neither `w32' nor `x' so your `font'
variable is set to nil.

        Stefan