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: gamename
Subject: Re: Font lock for #if 0 ... #endif
Date: 24 May 2007 16:49:56 -0700
User-agent: G2/1.0

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



reply via email to

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