Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2017-12-21 10:56:26 -0500
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-09-11 09:30:51 -0400
commit9a7e1711b7b504e478873f76d0bb4612c8f7e4f0 (patch)
tree421a6ea20243ec37213843c2e8b01d9cfd1697cb
parentec379ea29688828677ba0efba43cb003c0363f13 (diff)
downloadtame-9a7e1711b7b504e478873f76d0bb4612c8f7e4f0.tar.gz
tame-9a7e1711b7b504e478873f76d0bb4612c8f7e4f0.tar.bz2
tame-9a7e1711b7b504e478873f76d0bb4612c8f7e4f0.zip
alias: Inherit descriptions from source symbols
* alias.xml (_classify-alias_, _rate-alias_): Inherit symbol desc.
-rw-r--r--core/alias.xml13
1 files changed, 9 insertions, 4 deletions
diff --git a/core/alias.xml b/core/alias.xml
index c0a50f3..eb32147 100644
--- a/core/alias.xml
+++ b/core/alias.xml
@@ -25,14 +25,16 @@
These alias templates allow giving a new name to existing values.
They are most useful for avoiding too many template-generated variables.
+ If no description is provided,
+ aliases will inherit the description from the source symbol.
+
<template name="_classify-alias_"
desc="Alias classification">
<param name="@as@" desc="Classification alias name" />
<param name="@from@" desc="Source classification" />
<param name="@desc@" desc="Classification alias description">
- <text>Alias for </text>
- <param-value name="@from@" />
+ <param-sym-value prefix=":class:" name="@from@" value="desc" />
</param>
<param name="@yields@" desc="Classification alias yield">
@@ -67,6 +69,10 @@
<param name="@generates@" desc="Generator alias name" />
<param name="@from@" desc="Source generator" />
+ <param name="@desc@" desc="Generator alias description">
+ <param-sym-value name="@from@" value="desc" />
+ </param>
+
<param name="@yields@" desc="Yield alias name">
<text>_</text>
<param-value name="@generates@" />
@@ -74,8 +80,7 @@
<rate yields="@yields@">
- <c:sum of="@from@" desc="Alias iterator"
- generates="@generates@" index="k">
+ <c:sum of="@from@" desc="@desc@" generates="@generates@" index="k">
<c:value-of name="@from@" index="k" />
</c:sum>
</rate>