[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to Conditionally Change Background in EMacs
From: |
Kevin Rodgers |
Subject: |
Re: How to Conditionally Change Background in EMacs |
Date: |
Wed, 22 Feb 2012 21:24:04 -0700 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.27) Gecko/20120216 Thunderbird/3.1.19 |
On 2/21/12 2:16 AM, Shahar Klein wrote:
I am using EMacs 21.4 on Linux.
Consider upgrading: 21.4 was released on Feb. 6 2005. 23.4 is the latest
stable release, from Jan. 29 2012.
I would like to tweak my emacs configuration so that if I open a read-only file,
the default face background of that session will change.
Is it possible ?
(add-hook 'find-file-hooks
(lambda ()
(when buffer-read-only
(set-background-color "yellow"))))
--
Kevin Rodgers
Denver, Colorado, USA