Function: ibtypes::rfc-toc

ibtypes::rfc-toc is a byte-compiled function defined in hibtypes.el.

Signature

(ibtypes::rfc-toc)

Documentation

Summarize the contents of an Internet rfc from anywhere within an rfc buffer.

Each line in the summary may be selected to jump to a section.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hibtypes.el
;;; ========================================================================
;;; Summarizes an Internet rfc for random access browsing by section.
;;; ========================================================================

(defib rfc-toc ()
  "Summarize the contents of an Internet rfc from anywhere within an rfc buffer.
Each line in the summary may be selected to jump to a section."
  (let ((case-fold-search t)
        (toc)
        (opoint (point))
	sections-start)
    (if (and (string-match "\\`rfc[-_]?[0-9]" (buffer-name))
	     (not (string-match "toc" (buffer-name)))
             (goto-char (point-min))
             (progn (setq toc (search-forward "Table of Contents" nil t))
                    (re-search-forward "^[ \t]*1.0?[ \t]+[^ \t\n\r]" nil t
                                       (and toc 2))))
        (progn (beginning-of-line)
	       (setq sections-start (point))
               (ibut:label-set (buffer-name))
	       (goto-char opoint)
               (hact 'rfc-toc (buffer-name) nil sections-start))
      (goto-char opoint)
      nil)))