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

From: Herbert Euler <[email-masked]>
Date: Mon, 2 Feb 2009 15:00:38 +0800

>> Package: Emacs
>> Version: 23.0.90.1
>>
>> 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).
>
> The bug is in your .emacs
>
> C-h v window-system RET
>
> Documentation:
> Name of window system through which the selected frame is displayed.
> The value is a symbol--for instance, `x' for X windows.
> The value is nil if the selected frame is on a text-only-terminal.
>
> When "emacs --daemon" starts there's no X frame.
 
Certainly it is not a bug that the cons cell added is '(font . nil).
The bug I refered is the crash caused by adding this cons cell.  In
fact, such a crash can be reproduced by evaluating the following:
 
  (progn (add-to-list 'default-frame-alist '(font . nil))
         (make-frame-command))
 
I suggest checking the value of the `font' parameter to be added to
make sure it is valid.
 
PS: I'm sorry for my ambiguous bug report.
 
Regards,
Guanpeng Xu
 
_________________________________________________________________
Drag n’ drop—Get easy photo sharing with Windows Live™ Photos.

http://www.microsoft.com/windows/windowslive/photos.aspx