branch: elpa/tuareg commit de7e6c43e13bac897b25b89980dda775222b3b0a Author: Christophe Troestler <christophe.troest...@umons.ac.be> Commit: Christophe Troestler <christophe.troest...@umons.ac.be>
Use the default commenting style & explain how to customize this Fixes https://github.com/ocaml/tuareg/issues/238 --- README.md | 11 +++++++++++ tuareg.el | 1 - 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6af97f0..392ce8e 100644 --- a/README.md +++ b/README.md @@ -128,6 +128,17 @@ Tips & customization [electric-indent-mode]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Indent-Convenience.html +- Tuareg respects you default commenting style. However, in OCaml, + commenting a region is usually done with a single multi-line comment + and without leading stars on each line. You can have that behavior + in OCaml buffers by setting: + + (add-hook 'tuareg-mode-hook + (lambda() + (setq-local comment-style 'multi-line) + (setq-local comment-continue " "))) + + - Syntax highlighting has 3 levels. You can select the one you prefer by setting [font-lock-maximum-decoration][] from `0` to `2`. By default, [font-lock-maximum-decoration][] is set to `t` which diff --git a/tuareg.el b/tuareg.el index 14237b5..f346bdd 100644 --- a/tuareg.el +++ b/tuareg.el @@ -3147,7 +3147,6 @@ Short cuts for interactions with the REPL: (setq-local comment-start "(* ") (setq-local comment-end " *)") (setq-local comment-start-skip "(\\*+[ \t]*") - (setq-local comment-style 'multi-line) ;; `ocamlc' counts columns from 0, contrary to other tools which start at 1. (setq-local compilation-first-column 0) (setq-local compilation-error-screen-columns nil)