all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* customizing some options in cc mode
@ 2009-07-12  9:47 Luca
  2009-07-12 10:57 ` Dirk-Jan C. Binnema
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Luca @ 2009-07-12  9:47 UTC (permalink / raw
  To: help-gnu-emacs

Hello everyone,

I recently started using emacs for my C++ development and I have a
question about customizing the colours.

I want to customize the code documentation to show up in purple. So
anything in between (// and /**) should show up in the specified
colour.

Does anyone know which emacs variable do I need to set in my .emacs
file for this to work?

Appreciate any help you can give me.

Many thanks,

Luca


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

* Re: customizing some options in cc mode
  2009-07-12  9:47 customizing some options in cc mode Luca
@ 2009-07-12 10:57 ` Dirk-Jan C. Binnema
  2009-07-12 11:51 ` Peter Dyballa
       [not found] ` <mailman.2346.1247399492.2239.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 4+ messages in thread
From: Dirk-Jan C. Binnema @ 2009-07-12 10:57 UTC (permalink / raw
  To: help-gnu-emacs


>>>>> "Luca" == Luca  <luca.pamparana@gmail.com> writes:

    Luca> Hello everyone,
    Luca> I recently started using emacs for my C++ development and I have a
    Luca> question about customizing the colours.

    Luca> I want to customize the code documentation to show up in purple. So
    Luca> anything in between (// and /**) should show up in the specified
    Luca> colour.

    Luca> Does anyone know which emacs variable do I need to set in my .emacs
    Luca> file for this to work?

I assume you already have font-locking (syntax-highlighting) enabled?

Anyway, this should do the trick (put in your .emacs):
  (set-face-foreground 'font-lock-comment-face "purple")

This is *global*, so will also affect the way comments are shown in other
modes.

If you want to customize many more of the colors, it might be worthwhile to
define your own color theme; I blogged about that:
  http://emacs-fu.blogspot.com/2009/03/color-theming.html

Best wishes,
Dirk.

-- 
Dirk-Jan C. Binnema                  Helsinki, Finland
e:djcb@djcbsoftware.nl           w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C




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

* Re: customizing some options in cc mode
  2009-07-12  9:47 customizing some options in cc mode Luca
  2009-07-12 10:57 ` Dirk-Jan C. Binnema
@ 2009-07-12 11:51 ` Peter Dyballa
       [not found] ` <mailman.2346.1247399492.2239.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Dyballa @ 2009-07-12 11:51 UTC (permalink / raw
  To: Luca; +Cc: help-gnu-emacs


Am 12.07.2009 um 11:47 schrieb Luca:

> Does anyone know which emacs variable do I need to set in my .emacs
> file for this to work?


Position the text cursor in such a comment and type C-u C-x =. In the  
*Help* window you'll a description, including that of the face. Click  
on that description and continue to start customising.

--
Greetings

   Pete

Encryption, n.: A powerful algorithmic encoding technique
		employed in the creation of computer manuals.







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

* Re: customizing some options in cc mode
       [not found] ` <mailman.2346.1247399492.2239.help-gnu-emacs@gnu.org>
@ 2009-07-12 12:02   ` Teemu Likonen
  0 siblings, 0 replies; 4+ messages in thread
From: Teemu Likonen @ 2009-07-12 12:02 UTC (permalink / raw
  To: Peter Dyballa; +Cc: help-gnu-emacs, Luca

On 2009-07-12 13:51 (+0200), Peter Dyballa wrote:

> Am 12.07.2009 um 11:47 schrieb Luca:
>
>> Does anyone know which emacs variable do I need to set in my .emacs
>> file for this to work?

> Position the text cursor in such a comment and type C-u C-x =. In the
> *Help* window you'll a description, including that of the face. Click
> on that description and continue to start customising.

If one is just interested in the face one of these will also do:

    M-x describe-face
    M-x customize-face

By default they will offer the face the cursor is currently on.




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

end of thread, other threads:[~2009-07-12 12:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-12  9:47 customizing some options in cc mode Luca
2009-07-12 10:57 ` Dirk-Jan C. Binnema
2009-07-12 11:51 ` Peter Dyballa
     [not found] ` <mailman.2346.1247399492.2239.help-gnu-emacs@gnu.org>
2009-07-12 12:02   ` Teemu Likonen

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.