[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Setting different default face for different major-modes ?
From: |
rplasson |
Subject: |
Re: Setting different default face for different major-modes ? |
Date: |
Wed, 8 Apr 2009 03:37:02 -0700 (PDT) |
User-agent: |
G2/1.0 |
On 7 avr, 23:34, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
> Another option is to use font A for the initial frame and
> font B for all other frames, i.e., the default frames. The initial
> frame might be used for TeX and the others for everything else.
Well I am not sure it would do the trick. What happens when you work
with several LaTeX files ?
Actually, the answer was quite simple (obtained in comp.emacs). I just
add a hook to LaTeX mode that change the buffer face when loaded,
which can be done by:
(add-hook 'LaTeX-mode-hook
'(lambda ()
(face-remap-set-base 'default '(:family
"LMRoman10" :height 100 :background "white"))))
It however seems that the face-remap-set-base function is new in
emacs23 (and may be present only on very recent versions).
Voila :)