🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by weir Tue, 09 Feb 1993 23:35
Request for examples using zones
#1043
Author: weir
Date: Tue, 09 Feb 1993 23:35
18 lines
1289 bytes

I have ascii text in which simple SGML-like notation is used to
delimit "interesting" areas, like: <foo> interesting area </foo>.  And
I would like to define a simple (I hope) command of the form "M-X
highlight-objects" which in this particular case would take "foo" as
an argument and highlight all instances of "foo" areas in the current
buffer.

If anyone out there has already implemented a "highlight-objects"
command of this sort, or something similar, I would be grateful for
some simple examples.  I assume that defining zones is the right thing
to do, but I don't have any experience using this feature of Epoch.


Many thanks,

Carl
Request for examples using zones
#1050
Author: Walter Blume
Date: Thu, 11 Feb 1993 02:34
25 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads