… in case if there are any
…is/agner into jlouis-optparse-handle-missing-arg
When missing an option argument, the system normally died. This prints out a helpful error message in the event. It also slightly reorders the option parsing, so it takes place before the start()/stop() sequence. In principle this lets us bail out faster.
Reap the benefits of the preceding commits: Output a usage list where the valid, supported, commands are included. Note that adding a command to the parser will automatically extend the usage output.
Rather than write code which acts as data, transform the code into data and write code acting on the data. This paves the way for outputting the commands in the usage.
Even though the one in the stdlib is not much better.
Rather than have option parsing spread out over the command handler function, gather all calls into a single point. This means that all option parsing is now handled in one place.
The agner:main/1 function actually did several things at once: * Provided parsing of command-line options * Provided handling of commands * Printed out general usage This change splits the concerns. First, we add a function to parse the command line options and internalize them. Next, we alter the command-handlers to match on the parsed variant. The change also allows us to hoist the start()/stop() invocation to main/1 and only do that in one place. Further, the change paves the way for a more consistent option parsing and argument handling further down the road.
…versions to release versions to match the actual glossary.
I default the tab-size to 8 here - and many other will do the same. To avoid trouble, we simply hint Emacs what the intended size of a tab is (4) and let it handle tabs and spaces. It also opens for dropping more settings to coerce Emacs into being nice.