1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-30 09:00:31 -08:00

Fix links from manual to converted design documents (ref target must follow index declaration, not precede it).

Fix conversion of citations when an element is missing.
Converted design documents depend on the converter.

Copied from Perforce
 Change: 182638
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Gareth Rees 2013-06-08 18:06:16 +01:00
parent 65078cdd17
commit 826bed4f26
3 changed files with 20 additions and 12 deletions

View file

@ -40,6 +40,8 @@ Old design
poollo
poolmfs
poolmrg
poolmv
poolmvt
poolmvff
prot
protan
@ -54,7 +56,9 @@ Old design
shield
splay
sso1al
strategy
telemetry
tests
thread-manager
thread-safety
trace

View file

@ -50,15 +50,15 @@ def secnum_sub(m):
# .. [THVV_1995] "Structure Marking"; Tom Van Vleck; 1995;
# <http://www.multicians.org/thvv/marking.html>.
# to:
# .. [THVV_1995] Tom Van Vleck. 1995. "`Structure Marking <http://www.multicians.org/thvv/marking.html>`__".
# .. [THVV_1995] Tom Van Vleck. 1995. "`Structure Marking <http://www.multicians.org/thvv/marking.html>`__".
citation = re.compile(
r'''
\.\.\s+(?P<ref>\[.*?\])\s*
"(?P<title>.*?)"\s*
;\s*(?P<author>.*?)\s*
(?:;\s*(?P<organization>.*?)\s*)?
^\.\.\s+(?P<ref>\[.*?\])\s*
"(?P<title>[^"]*?)"\s*
;\s*(?P<author>[^;]*?)\s*
(?:;\s*(?P<organization>[^;]*?)\s*)?
;\s*(?P<date>[0-9-]+)\s*
(?:;\s*<\s*(?P<url>.*?)\s*>\s*)?
(?:;\s*<\s*(?P<url>[^>]*?)\s*>\s*)?
\.
''',
re.VERBOSE | re.MULTILINE | re.IGNORECASE | re.DOTALL
@ -96,7 +96,7 @@ def convert_file(name, source, dest):
# to the whole document.
m = index.search(s)
if m:
s = index_sub(m) + s
s = index_sub(m) + '.. _design-{0}:\n\n'.format(name) + s
s = mode.sub(r'', s)
s = prefix.sub(r'.. mps:prefix:: \1', s)
s = rst_tag.sub(r'', s)
@ -116,7 +116,6 @@ def convert_file(name, source, dest):
except:
pass
with open(dest, 'w') as out:
out.write('.. _design-{0}:\n\n'.format(name))
out.write(s)
# Mini-make
@ -126,7 +125,8 @@ def convert_updated(app):
name = os.path.splitext(os.path.basename(design))[0]
if name == 'index': continue
converted = 'source/design/%s.rst' % name
if (not os.path.isfile(converted) or
os.path.getmtime(converted) < os.path.getmtime(design)):
if (not os.path.isfile(converted)
or os.path.getmtime(converted) < os.path.getmtime(design)
or os.path.getmtime(converted) < os.path.getmtime(__file__)):
app.info('converting design %s' % name)
convert_file(name, design, converted)

View file

@ -23,11 +23,13 @@ of pools, choosing the most appropriate pool class for each.
First, do you need the MPS to :term:`automatically <automatic memory
management>` :term:`reclaim` :term:`unreachable` blocks? If so, you
need an automatically managed (garbage collected) pool class and you
should consult :ref:`Choosing an automatic pool class` below.
should consult :ref:`pool-choose-automatic` below.
Otherwise, you need a manually managed pool class and you should
consult :ref:`Choosing a manual pool class` below.
consult :ref:`pool-choose-manual` below.
.. _pool-choose-automatic:
Choosing an automatic pool class
--------------------------------
@ -60,6 +62,8 @@ no weak nothing suitable
====================== =========== ===================
.. _pool-choose-manual:
Choosing a manual pool class
----------------------------