🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.epoch.misc
Article #1540

Source code highlighting package, v2.

#1540
From: Marc Andreessen
Date: Sun, 29 Mar 1992 14:45
54 lines
2826 bytes
People who are interested in source-code highlighting in Epoch 4.0 may
want to check out v2 of my marc-hilite package.  Anonymous FTP to
ftp.ncsa.uiuc.edu (141.142.20.50) in /outgoing/marca as
marc-hilite-2.tar.Z.

Changes:
  o Many variables are buffer-local (comment highlighting on/off,
    syntax-directed touchup on/off, re-highlight on write on/off,
    etc.)
  o Threshold file sizes for both comment and touchup highlighting
    (files above a certain size won't be highlighted in ways that
    would cause serious performance degradation).
  o Highlight whole buffer, this function, or this paragraph at
    any one time, with proper handling of per-region zone deletion
    to keep things fast.
  o Interactive manipulation of all important parameters.
  o Instant, real-time highlighting, As You Type(tm), via 
    after-change-function.  (Current line is highlighted 
    every 'n' changes, where you control the value of 'n'.)
    You have to compile Epoch with DEFINE_CHANGE_FUNCTIONS
    enabled in src/config.h for this to work.
  o Rolled support for highlight on write back in (I don't use
    it, but somebody might like it).
  o Cleaner code.

Original feature set, all still present:
  o Highlight whole buffer on load, by a keybinding, and in
    mail/rmail.
  o Highlight comments.
  o Highlight regexp-defined regions on a per-mode basis.
  o Interactive global toggling of both types of highlighting.
  o In-string checking.

It's still in progress, and there's at least one known problem
(instant highlighting and comment highlighting don't work perfectly
together), but overall it's pretty stable.  Documentation has yet to
be written, but the code is commented.

Still to come: better control over just what's highlighted
(customizable, extendable lists of modes and regexp's), plus any
suggestions people throw my way.

If you actually use this code, send me a note; I'd like to find out
whether or not it's useful.  Similarly, bug reports, suggestions,
criticisms are very welcome.

Enjoy,
Marc

--
Marc Andreessen
Software Tools Group
National Center for Supercomputing Applications
marca@ncsa.uiuc.edu
Technical Details
Message-ID: <9203291445.AA00269@xongmao.ncsa.uiuc.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!emory!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ncsa.uiuc.edu!marca

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fc7ee,ab969630d365f401,start
X-Google-Attributes: gidfc7ee,public
X-Google-ArrivalTime: 1992-03-29 06:45:22 PST
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!emory!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ncsa.uiuc.edu!marca
From: marca@ncsa.uiuc.edu (Marc Andreessen)
Newsgroups: gnu.epoch.misc
Subject: Source code highlighting package, v2.
Message-ID: <9203291445.AA00269@xongmao.ncsa.uiuc.edu>
Date: 29 Mar 92 14:45:22 GMT
Article-I.D.: xongmao.9203291445.AA00269
Sender: daemon@cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 54