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] q
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-01-09 (07:21)
From: Kamil Shakirov <kamils@n...>
Subject: Re: [Caml-list] Tuareg
Hello Jérôme,

Jérôme Marant <> writes:

>> > I meant `folding' --- hiding parts of the edited program. Probably you
>> > did not understand me because my english is not good. ;)
>> > 
>> > Anyway, thank you for your answer.
>> > 
>> > I have found similar minor edit mode (hideshow.el, hs-minor-mode for
>> > block hiding and showing) but it is for c-mode. It would be nice
>> > implement this in tuareg mode.
>> Thanks for the suggestion, I'll take a look to hideshow.el to see
>> if it can be customized and reused within Tuareg.
> There's also a folding.el mode around, which is not bad at all.

I know about this minor mode. But I want to hide only a body of
function except a header (let binding).

This is note from the folding.el file:

;;  Please note, that the maintainers do not recommend to use only
;;  folding for you your code layout and navigation. Folding.el is on
;;  its best when it can "chunk" large sections of code inside
;;  folds. The larger the chunks, the more the usability of folding will
;;  increase. Folding.el is not meant to hide individual functions: you
;;  may be better served by hideshow.el or imenu.el (which can parse
;;  the function indexes)

And I agree with above note.

This is my example code with special fold markers:

let foo a b c =
(* {{{ *)
   List.iter (fun x -> x*a + x*b + x*c)
(* }}} *)

Folding mode works fine:

let foo a b c =
(* {{{ *) ...

But the code looks ugly. ;)

It would be nice if above code would look like this (when folding
mode is enabled):

let foo a b c = int -> int -> int -> int list -> int list


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