caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Kamil Shakirov <kamils@narod.ru>
To: Jérôme Marant <jmarant@free.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Tuareg
Date: Fri, 09 Jan 2004 10:27:04 +0300	[thread overview]
Message-ID: <m24qv5fupj.fsf@tornado.force> (raw)
In-Reply-To: <1073573164.3ffd6d2c77231@imp3-a.free.fr> (Jérôme Marant's message of "Thu,  8 Jan 2004 15:46:04 +0100")

Hello JИrТme,

JИrТme Marant <jmarant@free.fr> 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

-- 
 Kamil.

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2004-01-09  7:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-05 20:00 [Caml-list] q Kamil Shakirov
2004-01-07  7:08 ` [Caml-list] Tuareg Christophe TROESTLER
2004-01-08  2:09   ` Kamil Shakirov
2004-01-08 14:13     ` Albert Cohen
2004-01-08 14:46       ` Jérôme Marant
2004-01-09  7:27         ` Kamil Shakirov [this message]
2004-01-08  2:18   ` Kamil Shakirov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m24qv5fupj.fsf@tornado.force \
    --to=kamils@narod.ru \
    --cc=caml-list@inria.fr \
    --cc=jmarant@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).