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

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

Re: Font lock for #if 0 ... #endif


From: Eli Zaretskii
Subject: Re: Font lock for #if 0 ... #endif
Date: Fri, 25 May 2007 08:54:08 +0300

> From: gamename <namesagame-usenet@yahoo.com>
> Date: 24 May 2007 16:49:56 -0700
> 
> Excellent!
> 
> Thanks for the help. :)
> 
> -T
> martin rudalics wrote:
> > > Ok.  I guess it really isn't possible to do what I wanted to anyway.
> >
> > Add the following lines to your .emacs:
> >
> > (require 'hideif)
> >
> > (defun hide-ifdef-region-internal (start end)
> >    (remove-overlays start end 'face 'font-lock-warning-face)
> >    (let ((o (make-overlay start end)))
> >      (overlay-put o 'face 'font-lock-warning-face)))
> >
> > (defun hif-show-ifdef-region (start end)
> >    "Everything between START and END is made visible."
> >    (remove-overlays start end 'face 'font-lock-warning-face))
> >
> > Save and (evaluate .emacs or) restart Emacs, open the file of
> > your choice, and do
> >
> > M-x hide-ifdefs

Martin, how about extending hideif to allow this as an option?  It
sounds like a good feature.

TIA




reply via email to

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