all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sander Boer <sanderboer@yahoo.com>
To: emacs-devel@gnu.org
Subject: Re: How to change font only in gnus-article buffer ?
Date: Sun, 24 Jul 2011 20:28:09 +0200	[thread overview]
Message-ID: <871uxf4jpi.fsf@mauc.nl> (raw)
In-Reply-To: CAAeL0SStf54ZX3RtvDH+wfEUeDeQWgSTsiORmKNTgN5WVCWjYA@mail.gmail.com

Juanma Barranquero <lekktu@gmail.com> writes:

> On Fri, Jul 22, 2011 at 19:43, Sander Boer <sanderboer@yahoo.com> 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"
(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




  reply	other threads:[~2011-07-24 18:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-22 17:43 How to change font only in gnus-article buffer ? Sander Boer
2011-07-23 12:00 ` Juanma Barranquero
2011-07-24 18:28   ` Sander Boer [this message]
2011-07-24 20:13     ` Juanma Barranquero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871uxf4jpi.fsf@mauc.nl \
    --to=sanderboer@yahoo.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.