summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
fe3db23)
A more verbose category is needed for the index, but not the
description in the manual.
+ 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."""
@property
def cell(self):
"""The cell in which to store symbol metadata."""
"""The label for the documented object type."""
return self.objtype
"""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``.
def handle_signature(self, signature, signode):
"""Create nodes in ``signode`` for the ``signature``.
def _add_index(self, name, target):
index_text = '{name}; {label}'.format(
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))
self.indexnode['entries'].append(
('pair', index_text, target, '', None))