mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-03 16:14:11 +01:00
doc/emacs: split index category from label
A more verbose category is needed for the index, but not the description in the manual.
This commit is contained in:
parent
fe3db23684
commit
174221b179
1 changed files with 13 additions and 1 deletions
14
doc/elisp.py
14
doc/elisp.py
|
@ -110,6 +110,13 @@ class EmacsLispSymbol(ObjectDescription):
|
|||
'defface': 'face'
|
||||
}
|
||||
|
||||
category_for_objtype = {
|
||||
'defcustom': 'Emacs variable (customizable)',
|
||||
'defconst': 'Emacs constant',
|
||||
'defvar': 'Emacs variable',
|
||||
'defface': 'Emacs face'
|
||||
}
|
||||
|
||||
@property
|
||||
def cell(self):
|
||||
"""The cell in which to store symbol metadata."""
|
||||
|
@ -120,6 +127,11 @@ class EmacsLispSymbol(ObjectDescription):
|
|||
"""The label for the documented object type."""
|
||||
return self.objtype
|
||||
|
||||
@property
|
||||
def category(self):
|
||||
"""Index category"""
|
||||
return self.category_for_objtype[self.objtype]
|
||||
|
||||
def handle_signature(self, signature, signode):
|
||||
"""Create nodes in ``signode`` for the ``signature``.
|
||||
|
||||
|
@ -137,7 +149,7 @@ class EmacsLispSymbol(ObjectDescription):
|
|||
|
||||
def _add_index(self, name, target):
|
||||
index_text = '{name}; {label}'.format(
|
||||
name=name, label=self.label)
|
||||
name=name, label=self.category)
|
||||
self.indexnode['entries'].append(
|
||||
('pair', index_text, target, '', None))
|
||||
|
||||
|
|
Loading…
Reference in a new issue