* How to Conditionally Change Background in EMacs
@ 2012-02-21 9:16 Shahar Klein
2012-02-23 4:24 ` Kevin Rodgers
0 siblings, 1 reply; 2+ messages in thread
From: Shahar Klein @ 2012-02-21 9:16 UTC (permalink / raw)
To: help-gnu-emacs@gnu.org
[-- Attachment #1: Type: text/plain, Size: 578 bytes --]
Hi,
I am using EMacs 21.4 on Linux.
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 ?
Thanks,
SK.
Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog
[-- Attachment #2: Type: text/html, Size: 5372 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How to Conditionally Change Background in EMacs
2012-02-21 9:16 How to Conditionally Change Background in EMacs Shahar Klein
@ 2012-02-23 4:24 ` Kevin Rodgers
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Rodgers @ 2012-02-23 4:24 UTC (permalink / raw)
To: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-23 4:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-21 9:16 How to Conditionally Change Background in EMacs Shahar Klein
2012-02-23 4:24 ` Kevin Rodgers
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.