From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Zhou Ping" Newsgroups: gmane.emacs.help Subject: Re: Graying out the code in "#if 0/#endif" brace? Date: Wed, 23 Jun 2004 10:00:29 +0800 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: sea.gmane.org 1087957918 15889 80.91.224.253 (23 Jun 2004 02:31:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 23 Jun 2004 02:31:58 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 23 04:31:51 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BcxYE-0004z1-00 for ; Wed, 23 Jun 2004 04:31:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BcxZZ-0003HE-H6 for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Jun 2004 22:33:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BcxZP-0003GL-6L for help-gnu-emacs@gnu.org; Tue, 22 Jun 2004 22:33:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BcxZN-0003Ft-Aw for help-gnu-emacs@gnu.org; Tue, 22 Jun 2004 22:33:02 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BcxZN-0003Fq-93 for help-gnu-emacs@gnu.org; Tue, 22 Jun 2004 22:33:01 -0400 Original-Received: from [65.54.241.215] (helo=BAY0-HMR16.phx.gbl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BcxXQ-0005vc-5k for help-gnu-emacs@gnu.org; Tue, 22 Jun 2004 22:31:12 -0400 Original-Received: from hotmail.com ([65.54.169.3]) by BAY0-HMR16.phx.gbl with Microsoft SMTPSVC(5.0.2195.6713); Tue, 22 Jun 2004 19:01:07 -0700 Original-Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 22 Jun 2004 19:00:30 -0700 Original-Received: from 202.101.8.194 by by3fd.bay3.hotmail.msn.com with HTTP; Wed, 23 Jun 2004 02:00:29 GMT X-Originating-IP: [202.101.8.194] X-Originating-Email: [zhouping_jay@msn.com] X-Sender: zhouping_jay@msn.com Original-To: help-gnu-emacs@gnu.org X-OriginalArrivalTime: 23 Jun 2004 02:00:30.0778 (UTC) FILETIME=[DCB3A9A0:01C458C5] X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:19027 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:19027 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 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