     ;; http://emacs.stackexchange.com/a/2803/115
     (defun modi/outline-toc ()
       "Create a table of contents for outshine headers.
-Insert/update the TOC after the line that has the “<comment start> Contents:”
-string.
+
+For `emacs-lisp-mode':
+ - The Contents header has to be “;; Contents:”
+ - Level 1 headers will be of the form “;;; L1 Header”
+ - Level 2 headers will be of the form “;;;; L2 Header”
+ - ..
+
+For other major modes:
+ - The Contents header has to be “<comment-start> Contents:”
+ - Level 1 headers will be of the form “<comment-start> * L1 Header”
+ - Level 2 headers will be of the form “<comment-start> ** L2 Header”
+ - ..
 
 Don't add “Revision Control” heading to TOC."
       (interactive)

                          ;; trim white space from comment-start
                          (replace-regexp-in-string " " "" comment-start)))
                       "\\)"))
              parsed-outline-comment-start
              headings-list stars-list
              heading star)

          (while (re-search-forward
                  (concat "^\\(?1:" ; beginning of line
                          outline-comment-start
                          (if el-mode
                              (concat "\\{2\\}\\)" ; 2 consecutive ; in `emacs-lisp-mode'
                                      ";\\(?2:;*\\)") ; followed by one or more ; chars
                            (concat "\\s-\\{1\\}\\)" ; SINGLE white space
                                    "\\*\\(?2:\\**\\)")) ; followed by one or more * chars
                          " " ; followed by a space
                          "\\(?3:.+\\)") ; followed by heading
                  nil :noerror)
            (setq parsed-outline-comment-start (match-string-no-properties 1))
            ;; Note that the below `star' var stores one less * than the actual;
            ;; that's intentional. Also note that for `emacs-lisp-mode' the 3rd
            ;; consecutive ; onwards is counted as a “star”.
            (setq star    (match-string-no-properties 2))
            (setq heading (match-string-no-properties 3))
            ;; (message "%s %s %s" parsed-outline-comment-start star heading)
            (when (not (string= heading "Revision Control"))
              (setq stars-list    (cons star stars-list))
