all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How can I config the color of #include "test.h" in cpp file
@ 2008-10-12 19:58 yinglcs
  2008-10-13  7:13 ` Bastien
  0 siblings, 1 reply; 6+ messages in thread
From: yinglcs @ 2008-10-12 19:58 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

How can I config the color of #include "test.h" in cpp file?
especially the words "#include"?

I try putting these in .emacs :

(set-face-foreground 'font-lock-comment-face "firebrick")
(set-face-foreground 'font-lock-keyword-face "orange")

But it does not work.

Thank you for any help.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How can I config the color of #include "test.h" in cpp file
  2008-10-12 19:58 How can I config the color of #include "test.h" in cpp file yinglcs
@ 2008-10-13  7:13 ` Bastien
  2008-10-13  8:36   ` Peter Dyballa
  0 siblings, 1 reply; 6+ messages in thread
From: Bastien @ 2008-10-13  7:13 UTC (permalink / raw)
  To: help-gnu-emacs

"yinglcs@gmail.com" <yinglcs@gmail.com> writes:

> How can I config the color of #include "test.h" in cpp file?
> especially the words "#include"?

Put the cursor on the string you want to change the fontification of,
then type M-x cutomize-face RET.  This will bring up an interface where
you can change the color (among other aspects).

> (set-face-foreground 'font-lock-comment-face "firebrick")
> (set-face-foreground 'font-lock-keyword-face "orange")

Using `customize-face' is safer, because it just modifies the face of
the string under cursor.

HTH,

-- 
Bastien




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How can I config the color of #include "test.h" in cpp file
  2008-10-13  7:13 ` Bastien
@ 2008-10-13  8:36   ` Peter Dyballa
  2008-10-13  8:54     ` Bastien
  2008-10-13  9:19     ` Teemu Likonen
  0 siblings, 2 replies; 6+ messages in thread
From: Peter Dyballa @ 2008-10-13  8:36 UTC (permalink / raw)
  To: yinglcs, Bastien; +Cc: help-gnu-emacs


Am 13.10.2008 um 09:13 schrieb Bastien:

> Put the cursor on the string you want to change the fontification of,
> then type M-x cutomize-face RET.  This will bring up an interface  
> where
> you can change the color (among other aspects).

This works only in GNU Emacs 23 from CVS. In earlier versions  
describe-face is the entry function that opens a *Help* buffer with a  
link to the customisation interface.

--
Greetings

   Pete

A mathematician is a device for turning coffee into theorems.
				– Erdős Pál








^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How can I config the color of #include "test.h" in cpp file
  2008-10-13  8:36   ` Peter Dyballa
@ 2008-10-13  8:54     ` Bastien
  2008-10-13  9:19     ` Teemu Likonen
  1 sibling, 0 replies; 6+ messages in thread
From: Bastien @ 2008-10-13  8:54 UTC (permalink / raw)
  To: Peter Dyballa; +Cc: help-gnu-emacs, yinglcs

Peter Dyballa <Peter_Dyballa@Web.DE> writes:

> Am 13.10.2008 um 09:13 schrieb Bastien:
>
>> Put the cursor on the string you want to change the fontification of,
>> then type M-x cutomize-face RET.  This will bring up an interface
>> where
>> you can change the color (among other aspects).
>
> This works only in GNU Emacs 23 from CVS. In earlier versions
> describe-face is the entry function that opens a *Help* buffer with a
> link to the customisation interface.

Yes, that's right, thanks for this precision.

-- 
Bastien




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How can I config the color of #include "test.h" in cpp file
  2008-10-13  8:36   ` Peter Dyballa
  2008-10-13  8:54     ` Bastien
@ 2008-10-13  9:19     ` Teemu Likonen
  2008-10-13  9:49       ` Peter Dyballa
  1 sibling, 1 reply; 6+ messages in thread
From: Teemu Likonen @ 2008-10-13  9:19 UTC (permalink / raw)
  To: Peter Dyballa; +Cc: Bastien, help-gnu-emacs, yinglcs

[2008-10-13 10:36 +0200] Peter Dyballa wrote:

> Am 13.10.2008 um 09:13 schrieb Bastien:
>
>> Put the cursor on the string you want to change the fontification of,
>> then type M-x cutomize-face RET. This will bring up an interface
>> where you can change the color (among other aspects).
>
> This works only in GNU Emacs 23 from CVS. In earlier versions
> describe-face is the entry function that opens a *Help* buffer with a
> link to the customisation interface.

Hmm, Bastien said "customize-face" and you said "describe-face". Anyway,
thanks for the tip. They both work as expected in my Debian-packaged
Emacs 22.2.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How can I config the color of #include "test.h" in cpp file
  2008-10-13  9:19     ` Teemu Likonen
@ 2008-10-13  9:49       ` Peter Dyballa
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Dyballa @ 2008-10-13  9:49 UTC (permalink / raw)
  To: Teemu Likonen; +Cc: Bastien, help-gnu-emacs, yinglcs


Am 13.10.2008 um 11:19 schrieb Teemu Likonen:

> Hmm, Bastien said "customize-face" and you said "describe-face".  
> Anyway,
> thanks for the tip. They both work as expected in my Debian-packaged
> Emacs 22.2.

M-x customize-face when the cursor is on the face you want to alter  
has already the face's name! Thanks, learned again a bit.

Describe-face reveals the face's name when the cursor is on it, and  
customize-face let's you customise it.

--
Greetings

   Pete

War springs from unseen and generally insignificant causes.
				– Anonymous







^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-10-13  9:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-12 19:58 How can I config the color of #include "test.h" in cpp file yinglcs
2008-10-13  7:13 ` Bastien
2008-10-13  8:36   ` Peter Dyballa
2008-10-13  8:54     ` Bastien
2008-10-13  9:19     ` Teemu Likonen
2008-10-13  9:49       ` Peter Dyballa

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.