emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/tuareg de7e6c4 09/10: Use the default commenting style & e


From: ELPA Syncer
Subject: [nongnu] elpa/tuareg de7e6c4 09/10: Use the default commenting style & explain how to customize this
Date: Fri, 27 Aug 2021 09:57:37 -0400 (EDT)

branch: elpa/tuareg
commit de7e6c43e13bac897b25b89980dda775222b3b0a
Author: Christophe Troestler <Christophe.Troestler@umons.ac.be>
Commit: Christophe Troestler <Christophe.Troestler@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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]