Function: doc-view-imenu-index

doc-view-imenu-index is a byte-compiled function defined in doc-view.el.gz.

Signature

(doc-view-imenu-index &optional FILE-NAME GOTO-PAGE-FN)

Documentation

Create an imenu index using "mutool" to extract its outline.

For extensibility, callers can specify a FILE-NAME to indicate the buffer other than the current buffer, and a jumping function GOTO-PAGE-FN other than doc-view-goto-page.

Source Code

;; Defined in /usr/src/emacs/lisp/doc-view.el.gz
(defun doc-view-imenu-index (&optional file-name goto-page-fn)
  "Create an imenu index using \"mutool\" to extract its outline.

For extensibility, callers can specify a FILE-NAME to indicate
the buffer other than the current buffer, and a jumping function
GOTO-PAGE-FN other than `doc-view-goto-page'."
  (let* ((goto (or goto-page-fn 'doc-view-goto-page))
         (act (lambda (_name _pos page) (funcall goto page)))
         (outline (or doc-view--outline (doc-view--pdf-outline file-name))))
    (car (doc-view--imenu-subtree outline act))))