Article View: gnu.epoch.misc
Article #1050Request for examples using zones
From: Walter Blume
Date: Thu, 11 Feb 1993 02:34
Date: Thu, 11 Feb 1993 02:34
25 lines
1629 bytes
1629 bytes
RE: highlighting interesting areas of text that has SGML-like notation
I use the hilit.el package to do something like this for sgml like
documents that I edit (VAXDocument .sdml files). I got my copy
of hilit.el from the author, Paul Nakada (pnakada@oracle.com).
You simply make a custom mode (say SGML mode) and define a list of
regexp's that do specific types of hiliting. All you have to do
is give a regexp for the start of the region, and a regexp for the
end of the region.
Here is an example of c-mode highlights
'(("/\\*" "\\*/" 0) ;; hilight comments with style 0
("^#.*" nil 9) ;; hilight # at beginning of line with style 9
("^typedef.*" nil 1) ;; typedefs with style 1
("^struct.*" nil 1) ;; structs with style 1
("^#if 0" "^#endif" 3 ) ;; #if 0 followed by #endif with style 3
("^enum.*" nil 1))) ;; enum statements with style 1
Walt
Walter Blume
Siemens Medical Labs
wblume@jupiter.sml.com
Technical Details
Message-ID:
<9302101720.AA07896@saturn.local>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!spool.mu.edu!uwm.edu!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!jupiter.sml.COM!wblumeReferences:
<9302092212.AA11130@caesar.VFL.Paramax.COM>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc7ee,38610df8728c41df X-Google-Attributes: gidfc7ee,public X-Google-ArrivalTime: 1993-02-10 21:26:07 PST Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!spool.mu.edu!uwm.edu!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!jupiter.sml.COM!wblume From: wblume@jupiter.sml.COM (Walter Blume) Newsgroups: gnu.epoch.misc Subject: Request for examples using zones Date: 10 Feb 1993 21:34:12 -0500 Organization: GNUs Not Usenet Lines: 25 Sender: daemon@cis.ohio-state.edu Distribution: gnu Message-ID: <9302101720.AA07896@saturn.local> References: <9302092212.AA11130@caesar.VFL.Paramax.COM>