Post by Juanma BarranqueroPost by Sander BoerIs 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"
(interactive)
(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 "grey20")
(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