Mandar Mitra <[email protected]> writes:

> Just a suggestion, because it took me a little while to work out the
> connection between imenu entries and TeX-outline-extra.
>
> Current docstring for LaTeX-imenu-create-index-function (latex.el) is
> simply
>
> "Imenu support function for LaTeX."

I admit, the docstring is sparse.

> It might be a good idea to add something like the following.
>
> ---------------------------------------------------------------------------
> Also see the variable TeX-outline-extra which can be customised to
> create additional, user-defined imenu entries, and the function
> LaTeX-outline-regexp, which constructs and returns the regular
> expression used to search for the default imenu entries in a LaTeX
> buffer.
> ---------------------------------------------------------------------------

We try not to include implementation details into docstrings.  What do
you think about something like this:

--8<---------------cut here---------------start------------->8---
Return an alist for Imenu support for LaTeX.

The returned alist is built by the same facilities used for outline
minor mode support.  Hence, the value of `TeX-outline-extra' is
respected.
--8<---------------cut here---------------end--------------->8---

`TeX-outline-extra' is described in the manual[1].

P.S. And I see that `TeX-outline-extra' is marked as a variable in the
manual where it should be custom one.  I'll fix the markup.

Best, Arash

Footnotes:
[1]  https://elpa.gnu.org/packages/doc/auctex.html#Outline

Reply via email to