From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Font lock for #if 0 ... #endif Date: Fri, 25 May 2007 08:54:08 +0300 Message-ID: References: <1180050596.728271.221800@x35g2000prf.googlegroups.com> NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1180072468 7124 80.91.229.12 (25 May 2007 05:54:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 25 May 2007 05:54:28 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 25 07:54:26 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HrSkr-000799-R1 for geh-help-gnu-emacs@m.gmane.org; Fri, 25 May 2007 07:54:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HrSkr-0000My-GH for geh-help-gnu-emacs@m.gmane.org; Fri, 25 May 2007 01:54:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HrSkf-0000Mj-2K for help-gnu-emacs@gnu.org; Fri, 25 May 2007 01:54:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HrSkd-0000MW-C9 for help-gnu-emacs@gnu.org; Fri, 25 May 2007 01:54:12 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HrSkd-0000MT-81 for help-gnu-emacs@gnu.org; Fri, 25 May 2007 01:54:11 -0400 Original-Received: from heller.inter.net.il ([213.8.233.23]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HrSkc-000389-Nd for help-gnu-emacs@gnu.org; Fri, 25 May 2007 01:54:10 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-84-228-166-30.inter.net.il [84.228.166.30]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id CQS34093 (AUTH halo1); Fri, 25 May 2007 08:54:09 +0300 (IDT) In-reply-to: <1180050596.728271.221800@x35g2000prf.googlegroups.com> (message from gamename on 24 May 2007 16:49:56 -0700) X-detected-kernel: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:44417 Archived-At: > From: gamename > 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