MPR#7551: manual, make final ";;" potentially optional in caml_example#1194
MPR#7551: manual, make final ";;" potentially optional in caml_example#1194gasche merged 3 commits intoocaml:trunkfrom
Conversation
This commit makes it possible to omit the final ";;" in a caml_example environment. By default, this final ";;" is still mandatory. A new command line option "-implicit-stop" makes it optional globally. This global setting can be overrided locally by adding an optional argument to the environment: * [toplevel] makes the ";;" mandatory * [verbatim] makes it optional The tutorial part of the manual is configured to use the mandatory ";;" mode globally for the sake of consistency whereas the language extension section uses the new optional ";;" mode.
|
I appreciate you going the extra mile for convenience, but I don't like the idea that the same usage of the environment will have different default behaviors in different parts of the manual. We save 10 characters each time, but at the cost of auto-discoverability of behavior -- think of beginners that just jump in the |
|
Disabling the difference of behaviors is quite straightforward. I am not sure how it implies a need for explicitness of the mode: we could also default to the current behavior. Nevertheless, being explicit would probably be better in a future where the two modes are rendered differently. So it might be better to make |
|
I went ahead and made |
d4de342 to
488dbd9
Compare
|
This is great, thanks! I'll wait for the CI results, but then you or I could merge. |
|
Merged. Thanks for the reactivity. Now we can resume business on MPR#7551. |
MPR#7551:
This PR makes it possible to omit the final
;;in a caml_example environment.By default, this final
;;is still mandatory and a new command line option-implicit-stopmakes it optional globally.This global setting can be overrided locally by adding an optional argument to the environment:
[toplevel]makes the final;;mandatory[verbatim]makes it optionalThis new optional argument must precedes the expected status argument:
The tutorial part of the manual is configured to use the globally mandatory
;;mode for the sake of consistency whereas the language extension section uses the new optional;;mode.