Function: Info-toc-insert

Info-toc-insert is a byte-compiled function defined in info.el.gz.

Signature

(Info-toc-insert NODES NODE-LIST LEVEL CURR-FILE)

Documentation

Insert table of contents with references to nodes.

Source Code

;; Defined in /usr/src/emacs/lisp/info.el.gz
(defun Info-toc-insert (nodes node-list level curr-file)
  "Insert table of contents with references to nodes."
  (let ((section "Top"))
    (while nodes
      (let ((node (assoc (car nodes) node-list))
            (indentation (make-string level ?\t)))
        (when (and (not (member (nth 2 node) (list nil section)))
                   (not (equal (nth 1 node) (nth 2 node))))
          (insert indentation (setq section (nth 2 node)) "\n"))
        (insert indentation "*Note " (car nodes) ":: \n")
        (Info-toc-insert (nth 3 node) node-list (1+ level) curr-file)
        (setq nodes (cdr nodes))))))