* ocaml-emacs mode with multiline comments
@ 2006-08-11 18:22 Christopher Kauffman
2006-08-11 19:01 ` [Caml-list] " Christophe TROESTLER
0 siblings, 1 reply; 2+ messages in thread
From: Christopher Kauffman @ 2006-08-11 18:22 UTC (permalink / raw)
To: caml-list
I have been developing for a few months with ocaml and find it adds a
lot enjoyment to programming. One small irritation that has bothered me
for a while is the handling of comments in the default emacs mode
'ocaml-mode' that comes with the ocaml installation. I may have a
setting wrong in my customization of emacs, but multiline comments never
seem to maintain a consisten color. Usually I will start comment using
the default keystroke M-; (which produces '(* *)') and proceed to type
in the commented area. The first line stays the color of a comment as
determined by the font-lock settings but when I hit enter to go to the
next line and indent, the coloring reverts to the standard non-comment
colors. Using the 'fill-paragraph' command (M-q) usually gets the whole
multiline comment to turn the comment color, but it seems that this
shouldn't be required. Also, there is no smart 'fill-paragraph' for
ocaml-mode so that program code will be filled in with the comments if
there is not a blank line separating them.
I have experimented a bit with Tuareg-mode, the alternate mode for ocaml
editing, and it did solve this, but I prefered the indenting in the
default ocaml-mode and Tuareg seemd to have trouble with font colors for
functions with labels.
There seem to be a number of similar discussions between the two emacs
modes in the archives on this list but I couldn't locate anything that
dealt with these specific issues, the multiline comments and comment
filling, in ocaml-mode. If anyone has pointers to other discussion or
tips, please enlighten me.
Cheers,
Chris
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] ocaml-emacs mode with multiline comments
2006-08-11 18:22 ocaml-emacs mode with multiline comments Christopher Kauffman
@ 2006-08-11 19:01 ` Christophe TROESTLER
0 siblings, 0 replies; 2+ messages in thread
From: Christophe TROESTLER @ 2006-08-11 19:01 UTC (permalink / raw)
To: kauffman; +Cc: caml-list
On Fri, 11 Aug 2006, Christopher Kauffman <kauffman@cs.umn.edu> wrote:
>
> I have experimented a bit with Tuareg-mode, the alternate mode for ocaml
> editing, and it did solve this, but I prefered the indenting in the
> default ocaml-mode
This will solve the indenting "problem":
(add-hook 'tuareg-mode-hook
(function (lambda ()
(setq tuareg-in-indent 0)
(setq tuareg-let-always-indent t)
(setq tuareg-let-indent tuareg-default-indent)
(setq tuareg-with-indent 0)
(setq tuareg-function-indent 0)
(setq tuareg-fun-indent 0)
(setq tuareg-parser-indent 0)
(setq tuareg-match-indent 0)
(setq tuareg-begin-indent tuareg-default-indent)
(setq tuareg-parse-indent tuareg-default-indent); .mll
(setq tuareg-rule-indent tuareg-default-indent)
(setq tuareg-font-lock-symbols nil)
)))
Cheers,
ChriS
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-08-11 19:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-11 18:22 ocaml-emacs mode with multiline comments Christopher Kauffman
2006-08-11 19:01 ` [Caml-list] " Christophe TROESTLER
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).