* [Caml-list] tuareg clause indentation in pattern matching
@ 2013-04-13 13:06 José Romildo Malaquias
2013-04-13 13:55 ` Daniel Bünzli
2013-04-15 20:52 ` [Caml-list] " Stefan Monnier
0 siblings, 2 replies; 5+ messages in thread
From: José Romildo Malaquias @ 2013-04-13 13:06 UTC (permalink / raw)
To: caml-list
Hello.
I am using tuareg-mode-2.0.6 with emacs-24.3.1 to edit OCaml source
code.
I want to have the clause in a pattern matching indented like the
following:
| pattern ->
clause
But I am getting:
| pattern ->
clause
I have tried with tuareg-match-clause-indent set to 3, but nothing
changed.
Any clues?
Romildo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] tuareg clause indentation in pattern matching
2013-04-13 13:06 [Caml-list] tuareg clause indentation in pattern matching José Romildo Malaquias
@ 2013-04-13 13:55 ` Daniel Bünzli
2013-04-15 20:52 ` [Caml-list] " Stefan Monnier
1 sibling, 0 replies; 5+ messages in thread
From: Daniel Bünzli @ 2013-04-13 13:55 UTC (permalink / raw)
To: José Romildo Malaquias; +Cc: caml-list
Le samedi, 13 avril 2013 à 14:06, José Romildo Malaquias a écrit :
> Any clues?
I suggest you to use ocp-indent [1]. It should work with tuareg mode.
Best,
Daniel
[1] https://github.com/OCamlPro/ocp-indent
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Caml-list] Re: tuareg clause indentation in pattern matching
2013-04-13 13:06 [Caml-list] tuareg clause indentation in pattern matching José Romildo Malaquias
2013-04-13 13:55 ` Daniel Bünzli
@ 2013-04-15 20:52 ` Stefan Monnier
2013-04-18 8:56 ` Romain Bardou
1 sibling, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2013-04-15 20:52 UTC (permalink / raw)
To: caml-list
> I want to have the clause in a pattern matching indented like the
> following:
> | pattern ->
> clause
> But I am getting:
> | pattern ->
> clause
> I have tried with tuareg-match-clause-indent set to 3, but nothing
> changed.
If you (setq tuareg-use-smie t) in your .emacs I can probably help you
get that indentation.
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] Re: tuareg clause indentation in pattern matching
2013-04-15 20:52 ` [Caml-list] " Stefan Monnier
@ 2013-04-18 8:56 ` Romain Bardou
2013-04-18 12:33 ` Stefan Monnier
0 siblings, 1 reply; 5+ messages in thread
From: Romain Bardou @ 2013-04-18 8:56 UTC (permalink / raw)
To: caml-list
Le 15/04/2013 22:52, Stefan Monnier a écrit :
>> I want to have the clause in a pattern matching indented like the
>> following:
>
>> | pattern ->
>> clause
>
>> But I am getting:
>
>> | pattern ->
>> clause
>
>> I have tried with tuareg-match-clause-indent set to 3, but nothing
>> changed.
>
> If you (setq tuareg-use-smie t) in your .emacs I can probably help you
> get that indentation.
Indeed that does the trick but this causes all sort of other annoying
indentation rules, such as:
foooooo bar
bla
instead of:
foooooo bar
bla
--
Romain Bardou
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Caml-list] Re: tuareg clause indentation in pattern matching
2013-04-18 8:56 ` Romain Bardou
@ 2013-04-18 12:33 ` Stefan Monnier
0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2013-04-18 12:33 UTC (permalink / raw)
To: caml-list
> Indeed that does the trick but this causes all sort of other annoying
> indentation rules, such as:
> foooooo bar
> bla
> instead of:
> foooooo bar
> bla
Indeed, SMIE likes to align arguments. As the author, I of course agree
with this decision and think it only makes a lot of sense. If you want
less indentation then you have to use
foooooo
bar
bla
-- Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-04-18 12:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-13 13:06 [Caml-list] tuareg clause indentation in pattern matching José Romildo Malaquias
2013-04-13 13:55 ` Daniel Bünzli
2013-04-15 20:52 ` [Caml-list] " Stefan Monnier
2013-04-18 8:56 ` Romain Bardou
2013-04-18 12:33 ` Stefan Monnier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox