As for yesterday, this is going to be a short post, as will the next few as we pass through the height of the Christmas season. In all years past I’ve managed to fulfill the Devember contract minimum of one hour per day, and I don’t plan on missing out on that this year. However that does mean that devlog posts will not be as detailed as they usually are.
This is probably not that great a hardship since at the moment most of the coding being done is low key cleanup and feature additions that were planned out for the point in December where I will probably have less time and people will be less inclined to want to read anything anyway.
The big changes in the code today were the inclusion of a new API function in the help core that takes arbitrary topic text and returns back (if possible) the topic information for it. This does all of the work of making sure that all expansions and case folding have happened, so that code that wants to know a topic can just blindly hand something over and see what falls out.
Although that makes the code much cleaner to look at (and there are more similar changes to come), the big reason for this is to be able to support a feature that makes writing help a little bit less tedious: topic aliases.
link inherently jumps to an
anchor, and every anchor uses specific text, so a situation arises in which you want to create an anchor on text so that it is a good navigation point, but that text may not make the best link name. For example, you might have a heading of “Package Operations” but you don’t want to use that as the link text where “operations” would suffice.
Aliases solve this problem by providing an additional set of names that point at the topics that exist. Aliases and topics inherently share the same name space, so just like two topics can’t have the same topic text, the same alias can’t be used more than once and you can’t make a topic if there is already an alias with that name (and vice versa).
The inclusion of the new lookup function was aimed at this so that all places in the code, once they were altered to use this API, transparently work with aliases without having to do anything special at all.
Using this, several broken links in the core hyperhelp text are now resolved by creating aliases to the appropriate topics, and as mentioned above some headers are now more complete anchors, which makes help navigation look nicer as well.
Tomorrow more cleanup will happen in this area. There is still a lot of code in the core manually expanding and case folding topics when there should be a more isolated way to do it so that it can easily be tweaked in the future. There’s also still a lot of code to be cleaned up.