From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id YMr/B6po5mJq0QAAbAwnHQ (envelope-from ) for ; Sun, 31 Jul 2022 13:34:02 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id OHD7B6po5mISUgAA9RJhRA (envelope-from ) for ; Sun, 31 Jul 2022 13:34:02 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id EC0E23423B for ; Sun, 31 Jul 2022 13:34:01 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 8A8CB5F529; Sun, 31 Jul 2022 11:33:39 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 6E5FC5F3E3 for ; Sun, 31 Jul 2022 11:33:35 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id A93585FBCA; Sun, 31 Jul 2022 07:33:34 -0400 (EDT) Received: (nullmailer pid 2850508 invoked by uid 1000); Sun, 31 Jul 2022 11:33:26 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH 4/7] doc/emacs: split index category from label Date: Sun, 31 Jul 2022 08:33:20 -0300 Message-Id: <20220731113323.2845595-5-david@tethera.net> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20220731113323.2845595-1-david@tethera.net> References: <20220731113323.2845595-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: 5ILKLWD6GWREEY73GQY5DQGIS33EVLOE X-Message-ID-Hash: 5ILKLWD6GWREEY73GQY5DQGIS33EVLOE X-MailFrom: bremner@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1659267242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=jUZ35ewna33SUSiLbUb2V+l4x99OhGwHNO2AHIEIUF8=; b=MObIC5jxywYwBT0vwxUb6VzjB80zLXhYdvUnSZylvUx6UHO2JHx1wwLWY+85EQ0nFsOJMH tbb/BoWlygAy4zoofsuxbQO5jua7q3LTtQ9P5qfBOjh1tprr1IoZLvq8zpi3uE3ydkDRAL eNZKaq1/IkVNdUoGr/mMFjYleoedvRVTtKqTNC3GJDbFkQ5ggq+gKvCYiICW4LCJkqDTjR 4HyillIzCaEfdsRfaR7OAsjr3PuKCBwxcAQdKDpb49ty4f5WkhSrxYKFmKx4fvQGGg/fnw 5s3c36VjDjoJH7evxz840TX9a3yM4C0bGnNZzb813bGegECt8fNnxlaj/MmTfA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1659267242; a=rsa-sha256; cv=none; b=UbHLvhJQb8vZX1m/qtD6x5KWNX/kR1qXBbb2SW+YFIfQ/I62IDrKAyAGK/r2ts/GJDm6pA KdwuFwCuIV8LnvXmeejM2QzTejqOXn1U/IcoOWDmqrpdq+1iYTMaFdNDxGYtUhrvmmIiWi MPRmjIN8fmAyoHL48vfJUeCh0569294hBw1u3zlX027ftW/q7ry0vGvamx0AUJqCs4hbLY v02zSyGSlw1wL7DNwYVRL2vF94BiXjLn0MesjXkrqKS7sn+tZop1HnWZ8+H/Pl+3vuK5wJ ltyiQt4zCx8zSMkAEJpDY/oYlUZmXd11veJVDjDMyQ+Ni5sOU4TG+V6lx3N9zQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.19 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: EC0E23423B X-Spam-Score: -1.19 X-Migadu-Scanner: scn0.migadu.com X-TUID: 2w3S1cLi3vrW A more verbose category is needed for the index, but not the description in the manual. --- doc/elisp.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/doc/elisp.py b/doc/elisp.py index b8b4931b..1b0392e6 100644 --- a/doc/elisp.py +++ b/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)) -- 2.35.2