[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to change font only in gnus-article buffer ?

From: Sander Boer
Subject: Re: How to change font only in gnus-article buffer ?
Date: Sun, 24 Jul 2011 20:28:09 +0200
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (windows-nt)

Juanma Barranquero <address@hidden> writes:

> On Fri, Jul 22, 2011 at 19:43, Sander Boer <address@hidden> wrote:
>> Is it at all possible to change the default font in only one buffer ?
> Yes. Remap the face locally with `face-remapping-alist'.
>    (set (make-local-variable) 'face-remapping-alist '((default 
> variable-pitch)))
>     Juanma

Ok, I did just that and it looks ab-so-lute-ly lovely !
(I'm using the misterioso-theme on emacs 24)

One thing kind of bugs me, but I'm pretty sure it is unavoidable, the
rest of the (unpopulated) buffer window still shows the themed
background color. I'm pretty sure it is a result of the face-paradigm,
but I would love to be corrected on this !

+++++++ Begin src 
(defun sndr-clear-buffer ()
"changes the buffer into a clear formatted one"
(set (make-local-variable 'face-remapping-alist)
'((default :stipple nil :background "#e1e1e0" :foreground "#000000"  :family 
"Droid Serif" :height 110)
 (font-lock-builtin-face :foreground "grey10")
   (font-lock-comment-face :foreground "grey10")
   (font-lock-constant-face :foreground "grey10")
   (font-lock-function-name-face :foreground "grey10" :weight bold)
   (font-lock-keyword-face :foreground "grey10" :weight bold)
   (font-lock-string-face :foreground "grey10")
   (font-lock-type-face :foreground "grey10")
   (font-lock-variable-name-face :foreground "grey10")
   (font-lock-warning-face :foreground "red3" :weight bold)

   (w3m-anchor :background "#e1e1e0" :foreground "grey20")
   (w3m-image :background "#e1e1e0" :foreground "grey20")

;; Buttons and links
   (button :underline t)
   (link :foreground "black" :underline t)
   (link-visited :foreground "grey20" :underline t)
   ;; Gnus faces
   (gnus-header-content  :family "Droid Sans" :weight normal :foreground 
   (gnus-header-from  :family "Droid Sans" :foreground "grey20" :weight bold)
   (gnus-header-subject  :family "Droid Sans" :foreground "red3" :weight bold)
   (gnus-header-name  :family "Droid Sans" :foreground "#136")
   (gnus-header-newsgroups  :family "Droid Sans" :foreground "grey20")
   (gnus-cite-1 :foreground "#136")
   (gnus-cite-2 :foreground "#361")
   (gnus-cite-3 :foreground "#613")
   (gnus-cite-4 :foreground "#26b")
   (gnus-cite-5 :foreground "#6b2")
   (gnus-signature :foreground "#136")
   ;; Message faces
   (message-header-name :foreground "grey20" :weight bold)
   (message-header-newsgroups :foreground "grey20")
   (message-header-cc :foreground "grey20")
   (message-header-other :foreground "grey20")
   (message-header-subject :foreground "red3" :weight bold)
   (message-header-to :foreground "grey20")
   (message-cited-text :foreground "grey10")
   (message-separator :foreground "grey30")
   (diff-context :foreground "grey30")
   (mm-uu-extract :background "#e1e1e0")

(add-hook 'gnus-article-prepare-hook 'sndr-clear-buffer)
(add-hook 'message-mode-hook 'sndr-clear-buffer)

+++++++ End src 

Sander Boer

reply via email to

[Prev in Thread] Current Thread [Next in Thread]