[gnu.emacs] web-minor-mode with smart filters ??

eho@clarity.Princeton.EDU (Eric Ho) (09/14/89)

Just wondering if anyone has written web-minor-mode that will recognize web
constructs in a programming language's comments ?

The reason I mention this with minor-mode is that one wants to use all the
existing excellent editing facilities found in all major-modes (e.g.
Lisp-mode, C-mode, C++-mode, Emacs-Lisp-mode, ...etc...) and yet add extra
goodies to add/delete/change/browse all web-related stuff.  In other words, in
order to accomplish this, one must be able to 'hide' all web constructs as
that particular programming language's comments -- i.e. you've ordinary
comments (as in /* ... */ in C or ;;; in Lisp) and smart comments (e.g. 
/* ....@.... web constructs here .... */).  And the web-minor-mode should be
smart enough to recognize them.  In particular, it should be able process say
a region or the entire buffer and then strips all ordinary comments and
recognize all smart comments, process them and send the results (along with
the user's code of course) to ctangle (or any Spiderweb-generated tangle for
that particualar programming language you're using) and maybe from there to
'make' or whatever.  In other words, ctangle sees a perfect web file even the
buffer is a Lisp or C buffer.  This way, you enjoy the best of both worlds
(i.e. C-mode, Lisp-mode, ..etc.. ) as far as editing is concerned and you
don't need to write another major-mode (or worst, a separate major-web-mode
for each programming language) and you don't need to change anything tangle
nor weave.

Of course, one can always write separate filters and simple pipe a region of
the buffer to the shell and let those filters do all the stripping and then
send the output to ctangle (or whatever) but filters won't help you to jump
around web constructs in a Lisp or C buffer.

Oh well, just a thought.

--

Eric Ho
Cognitive Science Lab.,		Princeton University
voice = 609-258-2987		email = eho@confidence.princeton.edu
	609-258-2819 (messages)		eho@bogey.princeton.edu

regards.

-eric-