help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: what's simple syntax for defining faces? (just color text and backgr


From: Kevin Rodgers
Subject: Re: what's simple syntax for defining faces? (just color text and background color)
Date: Wed, 02 Sep 2009 22:05:46 -0600
User-agent: Thunderbird 2.0.0.23 (Macintosh/20090812)

Xah Lee wrote:
i would like to highlight some phrases when a file is opened.

So, i thought i put this in the first line:

-*- eval-expression: (hi-lock-face-phrase-buffer "me:" 'red ) -*-

however, the proper syntax for hi-lock-face-phrase-buffer seems to be:

(hi-lock-face-phrase-buffer "me:"
(defface hi-pink
  '((((background dark)) (:background "red" :foreground "black"))
    (t (:background "red")))
  "Face for hi-lock mode."
  :group 'hi-lock-faces)
)

can it be simpler? I just need to color the text and background.

i have other people's names i need to color red, blue.

1. Write a function that takes a color name and defines/returns a face by that
   name with the appropriate attributes.

2. Make sure the file where that function is defined gets loaded.

3. Call the function to provide the FACE argument to hi-lock-face-phrase-buffer.

--
Kevin Rodgers
Denver, Colorado, USA





reply via email to

[Prev in Thread] Current Thread [Next in Thread]