@code{doc-view-resolution}.
@vindex doc-view-imenu-enabled
- When the @command{mutool} executable is available, DocView will use
+ When the @command{mutool} program is available, DocView will use it
to generate entries for an outline menu, making it accessible via the
-imenu facility (@pxref{Imenu}). To disable this functionality even
-when @command{mutool} can be found in your @code{exec-path}, customize
-the variable @code{doc-view-imenu-enabled}.
+@code{imenu} facility (@pxref{Imenu}). To disable this functionality
+even when @command{mutool} can be found on your system, customize
+the variable @code{doc-view-imenu-enabled} to the @code{nil} value.
@node DocView Searching
@subsection DocView Searching
:version "29.1")
(defcustom doc-view-imenu-enabled (and (executable-find "mutool") t)
- "Whether to generate an imenu outline when mutool is available."
+ "Whether to generate an imenu outline when \"mutool\" is available."
:type 'boolean
:version "29.1")
"[^\t]+\\(\t+\\)\"\\(.+\\)\"\t#\\(?:page=\\)?\\([0-9]+\\)")
(defun doc-view--pdf-outline (&optional file-name)
- "Return a describing the outline of FILE-NAME (or current if nil).
+ "Return a list describing the outline of FILE-NAME.
+Return a list describing the current file if FILE-NAME is nil.
-Each element in the list contains information about a section's
+Each element in the returned list contains information about a section's
title, nesting level and page number. The list is flat: its tree
structure is extracted by `doc-view--imenu-subtree'."
(let* ((outline nil)
(cons (nreverse index) outline)))
(defun doc-view-imenu-index (&optional file-name goto-page-fn)
- "Create an imenu index using mutool to extract its outline.
+ "Create an imenu index using \"mutool\" to extract its outline.
-For extensibility, a FILE-NAME other than the current buffer and
-a jumping function, GOTO-PAGE-FN other than `doc-view-goto-page'
-can be specified."
+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))))
(car (doc-view--imenu-subtree (doc-view--pdf-outline file-name) act))))