Last update: 2006 03 07

My initiation into the world of Literate Programming took me to the great noweb system of Norman Ramsey.

When running it on Common Lisp source, I discovered that lisp syntax was significantly different from the generic one used by noweb to detect uses of defined identifiers.

Some helpful hints from NR lead me to create a new version of the noweb "c" source file finduses.nw.

In this version, finduses will check for the presence of an environment variable FINDUSES_LISP set to something other than "0". If this is the case, then specific lisp syntax will be applied when building the index references and hyperlinks in html. If not, then the standard syntax will be applied.

To build and install the lisp updated finduses:

  1. Download the finduses.nw source to the directory noweb/src/c.
  2. cd into that directory and execute the following command at the linux prompt:
    $ make finduses
  3. execute the following command as root at the linux prompt:
    $ cp finduses /usr/lib/noweb/

I have also created a simple autodef filter for Common Lisp that can plug into noweb.

This filter will detect any code lines that begin with "(def" and automatically declare them to be identifiers. This means that the use of the syntax:
@ %def toto
is no longer necessary for code blocks that begin with "(defun toto" or "(defparameter toto", etc.

To build and install the lisp autodef filter:

  1. Download the lispdefs.nw source and the updated Makefile to the directory noweb/src/icon.
  2. cd into that directory and execute the following command at the linux prompt:
    $ make autodefs.lisp
  3. execute the following command at the linux prompt:
    $ cp autodefs.lisp /usr/lib/noweb/

At this point the lisp language is available as an argument to the -autodefs option of noweave.

A sample script demonstating both the updated finduses and the lisp autodef filter is available here.

Thanks again to Norman Ramsey for noweb.