Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] ocaml-mode-3.05
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-08-07 (23:51)
From: Jacques Garrigue <garrigue@k...>
Subject: Re: [Caml-list] ocaml-mode-3.05
From: Yang Shouxun <>
> True. For instance, I'd rather an indentation for every consecutive 
> "let...", as in the Lisp style (I learned Scheme and Common Lisp before 
> Ocaml). That is, I prefer indentation to graphically show the structure 
> of the code, even at the risk of being stretched too much to the right. 
> With higher resolution of graphic displays and more careful organization 
> of the code, I guess the problem may be less imposing.

This is mostly a question of taste: I view most of the let's as
assignment, so I prefer not to indent them, since they do no more than
changing a binding.  But lots of people would disagree.

By the way, you can customize this in ocaml-mode too:
  (setq caml-let-in-indent 2)
The default is 0, meaning no indent.

On the other hand, not everything is customizable, and even when
customizable it may be a pain. For instance, I never came around to
allow a global change in the size of indentation: this is 2, or you
have to change it individually for every construct...

> I'm using tuareg for it allows me to run ocaml toplevel in emacs. I'm 
> not sure the ocaml-mode has such functionality.

Let's stop such blaring disinformation:
running the ocaml toplevel under emacs was the original goal of the caml
mode, and this already worked more than 10 years ago.
Thanks to Didier it is now pretty clever about errors, but then Tuareg
might be just as clever.

Jacques Garrigue
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: