* code between '#ifndef' with a different fore/background color
@ 2008-07-23 16:08 Rodrigo Canellas
2008-07-23 21:46 ` Lennart Borgman (gmail)
[not found] ` <mailman.15288.1216849621.18990.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 5+ messages in thread
From: Rodrigo Canellas @ 2008-07-23 16:08 UTC (permalink / raw
To: Help-gnu-emacs
Hi,
Is is possible to define that a block of code between a '#ifdef XYZ' -
'#endif', when 'XYZ' is not defined, is displayed with a different
foreground (or background) font color?
thanks a lot!
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: code between '#ifndef' with a different fore/background color
[not found] <mailman.15280.1216829450.18990.help-gnu-emacs@gnu.org>
@ 2008-07-23 21:13 ` weber
2008-07-24 12:38 ` Tim X
1 sibling, 0 replies; 5+ messages in thread
From: weber @ 2008-07-23 21:13 UTC (permalink / raw
To: help-gnu-emacs
On Jul 23, 1:08 pm, Rodrigo Canellas <rodrigo.canel...@tqtvd.com>
wrote:
> Hi,
>
> Is is possible to define that a block of code between a '#ifdef XYZ' -
> '#endif', when 'XYZ' is not defined, is displayed with a different
> foreground (or background) font color?
>
> thanks a lot!
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
I don't think that's be possible, because you can even define a
"DEFINE" by command line to gcc, right?
Just changing background for the region between #ifdef to #endif can
be done, though.
-weber
-weber
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: code between '#ifndef' with a different fore/background color
2008-07-23 16:08 Rodrigo Canellas
@ 2008-07-23 21:46 ` Lennart Borgman (gmail)
[not found] ` <mailman.15288.1216849621.18990.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 5+ messages in thread
From: Lennart Borgman (gmail) @ 2008-07-23 21:46 UTC (permalink / raw
To: Rodrigo Canellas; +Cc: Help-gnu-emacs
Rodrigo Canellas wrote:
> Hi,
>
> Is is possible to define that a block of code between a '#ifdef XYZ' -
> '#endif', when 'XYZ' is not defined, is displayed with a different
> foreground (or background) font color?
I do not think you can do it directly, but if you know emacs lisp you
could hack hide-ifdef-mode to do it.
If you do that then please tell us how you did it.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: code between '#ifndef' with a different fore/background color
[not found] ` <mailman.15288.1216849621.18990.help-gnu-emacs@gnu.org>
@ 2008-07-24 0:34 ` Jason Rumney
0 siblings, 0 replies; 5+ messages in thread
From: Jason Rumney @ 2008-07-24 0:34 UTC (permalink / raw
To: help-gnu-emacs
On Jul 23, 10:46 pm, "Lennart Borgman (gmail)"
<lennart.borg...@gmail.com> wrote:
> Rodrigo Canellas wrote:
> > Hi,
>
> > Is is possible to define that a block of code between a '#ifdef XYZ' -
> > '#endif', when 'XYZ' is not defined, is displayed with a different
> > foreground (or background) font color?
>
> I do not think you can do it directly, but if you know emacs lisp you
> could hack hide-ifdef-mode to do it.
>
> If you do that then please tell us how you did it.
See hide-ifdef-shadow (the variable to enable it, and the face of the
same name to customize the fore/background).
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: code between '#ifndef' with a different fore/background color
[not found] <mailman.15280.1216829450.18990.help-gnu-emacs@gnu.org>
2008-07-23 21:13 ` code between '#ifndef' with a different fore/background color weber
@ 2008-07-24 12:38 ` Tim X
1 sibling, 0 replies; 5+ messages in thread
From: Tim X @ 2008-07-24 12:38 UTC (permalink / raw
To: help-gnu-emacs
Rodrigo Canellas <rodrigo.canellas@tqtvd.com> writes:
> Hi,
>
> Is is possible to define that a block of code between a '#ifdef XYZ' -
> '#endif', when 'XYZ' is not defined, is displayed with a different
> foreground (or background) font color?
>
An ability similar to this apparently exists in emacs 23
(CVS). Accoridng to the news file, you can make these constructs
"shaded" rather than just invisible. I'm assuming shading really eans
setting them to different foreground/background colours to the main/rest
of the text.
Tim
--
tcross (at) rapttech dot com dot au
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-07-24 12:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.15280.1216829450.18990.help-gnu-emacs@gnu.org>
2008-07-23 21:13 ` code between '#ifndef' with a different fore/background color weber
2008-07-24 12:38 ` Tim X
2008-07-23 16:08 Rodrigo Canellas
2008-07-23 21:46 ` Lennart Borgman (gmail)
[not found] ` <mailman.15288.1216849621.18990.help-gnu-emacs@gnu.org>
2008-07-24 0:34 ` Jason Rumney
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.