unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Graying out the code in "#if 0/#endif" brace?
@ 2004-06-23  0:55 Zhou Ping
  2004-06-23  1:19 ` Gian Uberto Lauri
       [not found] ` <mailman.1187.1088266061.1953.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 7+ messages in thread
From: Zhou Ping @ 2004-06-23  0:55 UTC (permalink / raw)


Hello all,

I noticed that vim can use different color on the code enclosed in an "#if
0/#endif" directive brace. This is very useful for code editing or reading.
I wonder if emacs has this kind of feature? If so, how can I add/enable it?
Thanks.

Best regards,
Zhou Ping.

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: Graying out the code in "#if 0/#endif" brace?
@ 2004-06-23  2:00 Zhou Ping
  2004-06-23  7:00 ` Gian Uberto Lauri
  0 siblings, 1 reply; 7+ messages in thread
From: Zhou Ping @ 2004-06-23  2:00 UTC (permalink / raw)


Thank you! I'm not familiar with emacs/LISP programming, do you know any 
sample code for reference?

Best regards,
Zhou Ping.

= = = Original message = = =

>>>>>"ZP" == Zhou Ping <zhouping_jay@msn.com> writes:

ZP> Hello all,
ZP> I noticed that vim can use different color on the code enclosed in an 
"#if
ZP> 0/#endif" directive brace. This is very useful for code editing or 
reading.
ZP> I wonder if emacs has this kind of feature? If so, how can I add/enable 
it?
ZP> Thanks.

I don't think emacs has this but it's possible to add it, even if I have
some trouble doing something like in another mode I mantain.

The trick is to define #if[ ^I]+0 as a syntactic keyword and write a piece
of code that skips everithyng up to the #endif...

--
/\            ___
/___/\__|_|\_|__|___Gian Uberto Lauri_____________________
  //--\ | | \|  |   Integralista GNUslamico e fancazzista
\/

___________________________________________________________
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Graying out the code in "#if 0/#endif" brace?
@ 2004-06-23  0:54 Zhou, Ping A
  0 siblings, 0 replies; 7+ messages in thread
From: Zhou, Ping A @ 2004-06-23  0:54 UTC (permalink / raw)


Hello all,

I noticed that vim can use different color on the code enclosed in an
"#if 0/#endif" directive brace. This is very useful for code editing or
reading. I wonder if emacs has this kind of feature? If so, how can I
add/enable it? Thanks.

Best regards,
Zhou Ping.

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

end of thread, other threads:[~2004-06-30  1:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-23  0:55 Graying out the code in "#if 0/#endif" brace? Zhou Ping
2004-06-23  1:19 ` Gian Uberto Lauri
     [not found] ` <mailman.1187.1088266061.1953.help-gnu-emacs@gnu.org>
2004-06-29 20:25   ` David Kastrup
  -- strict thread matches above, loose matches on Subject: below --
2004-06-23  2:00 Zhou Ping
2004-06-23  7:00 ` Gian Uberto Lauri
2004-06-30  1:00   ` Zhou Ping
2004-06-23  0:54 Zhou, Ping A

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).