all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: bojohan+news@dd.chalmers.se (Johan Bockgård)
To: help-gnu-emacs@gnu.org
Subject: Re: Red background color when editing a file as root (using TRAMP)
Date: Sat, 15 Nov 2008 11:14:53 +0100	[thread overview]
Message-ID: <yoijtza9uwgy.fsf@remote1.student.chalmers.se> (raw)
In-Reply-To: 1226671257.585790@arno.fh-trier.de

Andreas Politz <politza@fh-trier.de> writes:

> Kevin Rodgers wrote:
>> Nordlöw wrote:
>>> How do I buffer-locally set the background color?
>>
>> You can't: background color is a frame parameter, so it can be set
>> local to each frame but not each buffer.
>>
>
> You can fake it with an overlay. But this works only on the non-empty
> parts of a buffer.
>
> (let ((ov (make-overlay (point-min) (point-max) (current-buffer) nil t)))
>   (overlay-put ov 'face '(:background "red")))

In Emacs 23 you can use

    (set (make-local-variable 'face-remapping-alist)
         '((default (:background "red"))))

(which has the same limitation).





      reply	other threads:[~2008-11-15 10:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-14  6:48 Red background color when editing a file as root (using TRAMP) Nordlöw
2008-11-14  9:06 ` Paul R
     [not found] ` <mailman.337.1226653574.26697.help-gnu-emacs@gnu.org>
2008-11-14 11:04   ` Nordlöw
2008-11-14 13:10     ` Kevin Rodgers
     [not found]     ` <mailman.348.1226668233.26697.help-gnu-emacs@gnu.org>
2008-11-14 13:59       ` Andreas Politz
2008-11-15 10:14         ` Johan Bockgård [this message]

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=yoijtza9uwgy.fsf@remote1.student.chalmers.se \
    --to=bojohan+news@dd.chalmers.se \
    --cc=help-gnu-emacs@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.