I'm planning to move StackMode to a literate program once it matures, but until then I'm using the conventional ^L
section markers.
My files look like this:
;;; Code:
^L
;;; Section 1 Title
(defun code () things)
^L
;;; Section 2 Title
(defun bleh () bergh)
I'd like to be able to add a hook that creates a table of contents at some marker, say ^;;; Contents:$
:
;;; Contents:
;;; 1. Section 1 Title
;;; 2. Section 2 Title
;;; Code:
^L
;;; Section 1 Title
(defun code () things)
^L
;;; Section 2 Title
(defun bleh () bergh)
For extra fun, subsections could be repeated linefeed characters:
^L^L
;;; Subsection