diff options
author | Eli Zaretskii <eliz@gnu.org> | 2022-09-27 16:01:50 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2022-09-27 16:01:50 +0300 |
commit | 37fe62a3bda82d21aa6fa30d28f1c51e4bd8e6b4 (patch) | |
tree | 8c1f2e70aa0d3d39de2c4eaba74885f2ecfec043 /lisp/doc-view.el | |
parent | fe215074392d7cdd965b97119892fa4e5366a051 (diff) | |
download | emacs-37fe62a3bda82d21aa6fa30d28f1c51e4bd8e6b4.tar.gz |
; Fix documentation of imenu access in DocView
* lisp/doc-view.el (doc-view-imenu-enabled)
(doc-view--pdf-outline, doc-view-imenu-index): Doc fixes.
* doc/emacs/misc.texi (DocView Navigation): Fix typo and wording.
Diffstat (limited to 'lisp/doc-view.el')
-rw-r--r-- | lisp/doc-view.el | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/doc-view.el b/lisp/doc-view.el index fe772efcfcc..fa583df12bd 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -215,7 +215,7 @@ are available (see Info node `(emacs)Document View')." :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") @@ -1884,9 +1884,10 @@ If BACKWARD is non-nil, jump to the previous match." "[^\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) @@ -1925,11 +1926,11 @@ entries at an upper level." (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)))) |