|
From: | Johan Bockgård |
Subject: | Re: Red background color when editing a file as root (using TRAMP) |
Date: | Sat, 15 Nov 2008 11:14:53 +0100 |
User-agent: | Gnus/5.110009 (No Gnus v0.9) Emacs/23.0.60 (gnu/linux) |
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).
[Prev in Thread] | Current Thread | [Next in Thread] |