From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 08E44BBBB for ; Sun, 19 Feb 2006 07:20:07 +0100 (CET) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.206]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k1J6K6rK008496 for ; Sun, 19 Feb 2006 07:20:06 +0100 Received: by zproxy.gmail.com with SMTP id o37so664017nzf for ; Sat, 18 Feb 2006 22:20:05 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:mime-version:content-type; b=kRxTMiGYezwLxxic7LDPLV2ILN3m5T5ssPh1rCLuxYw82TeoyBFsaCJJ8g3yf39pbnIJaIwyE2s2duzOUcnqn4U8pJXe6dBRmT/YssKVW1KeSXbQ4bOMhycAuJeJHedwueXC8EZvlHIDW3QqS0k3SL/o96uPqT9RPxueXLV7ci4= Received: by 10.65.159.18 with SMTP id l18mr64415qbo; Sat, 18 Feb 2006 22:20:05 -0800 (PST) Received: by 10.65.53.16 with HTTP; Sat, 18 Feb 2006 22:20:05 -0800 (PST) Message-ID: <2a1a1a0c0602182220r71236921q5245e21812bffc75@mail.gmail.com> Date: Sun, 19 Feb 2006 01:20:05 -0500 From: "Mike Lin" Sender: nilekim@gmail.com To: caml-list@yquem.inria.fr Subject: ocaml+twt v0.81 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_10615_26315411.1140330005445" X-Miltered: at nez-perce with ID 43F80E16.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; mikelin:01 ocaml:01 bugfix:01 ocaml:01 haskell:01 mikelin:01 bugfix:01 haskell:01 preprocessor:01 preprocessor:01 python:02 python:02 whitespace:02 limitations:02 whitespace:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=HTML_20_30,HTML_MESSAGE, RCVD_BY_IP autolearn=disabled version=3.0.3 ------=_Part_10615_26315411.1140330005445 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi all, Here's a small bugfix update to "The Whitespace Thing" for OCaml, a preprocessor that uses indentation instead of parenthesization to group multi-line expressions, like in Python and Haskell. Although the implementation approach I used has some limitations, I now use ocaml+twt fo= r all my new code and I recommend it, if you like this code style. http://people.csail.mit.edu/mikelin/ocaml+twt/ Mike -- Mike Lin mikelin@mit.edu CSAIL CompBio group, http://compbio.mit.edu/ 32-G536 x3-3434 ------=_Part_10615_26315411.1140330005445 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi all,

Here's a small bugfix update to "The Whitespace Thing&q= uot; for OCaml, a preprocessor that uses indentation instead of parenthesiz= ation to group multi-line expressions, like in Python and Haskell. Although= the implementation approach I used has some limitations, I now use ocaml+t= wt for all my new code and I recommend it, if you like this code style.

http://p= eople.csail.mit.edu/mikelin/ocaml+twt/

Mike


--
Mik= e Lin
mikelin@mit.edu
CSAIL Co= mpBio group,=20 http://compbio.mit.edu/
32-G536 = x3-3434
------=_Part_10615_26315411.1140330005445-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 33404BBBB for ; Tue, 21 Feb 2006 01:56:29 +0100 (CET) Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.197]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k1L0uSrr007567 for ; Tue, 21 Feb 2006 01:56:28 +0100 Received: by nproxy.gmail.com with SMTP id h2so661767nfe for ; Mon, 20 Feb 2006 16:56:28 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UHqC4VLOLjVgKa8nPOg+0LF9GboKgizxj20sX+3EkMVXgHxuD3P6JCpi08Z5dGFIID+ycMvzGnzBmZBdlvAMDETc8trLZdjfr+hESFdHrrzKbTxWLFuVoUd8dvxkT3RP8ZiMWXOdoX10VVjRx7PjQbc7oWkY6wYp1cbtUbCQhKQ= Received: by 10.48.240.15 with SMTP id n15mr694618nfh; Mon, 20 Feb 2006 16:56:28 -0800 (PST) Received: by 10.48.4.15 with HTTP; Mon, 20 Feb 2006 16:56:28 -0800 (PST) Message-ID: <9d3ec8300602201656m2e81bf82xf16a0298c2e744ac@mail.gmail.com> Date: Tue, 21 Feb 2006 01:56:28 +0100 From: "Till Varoquaux" To: "Mike Lin" Subject: Re: [Caml-list] ocaml+twt v0.81 Cc: caml-list@yquem.inria.fr In-Reply-To: <2a1a1a0c0602182220r71236921q5245e21812bffc75@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <2a1a1a0c0602182220r71236921q5245e21812bffc75@mail.gmail.com> X-Miltered: at nez-perce with ID 43FA653C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 behaves:01 tuareg:01 setq:01 setq:01 ocaml:01 cheers:01 caml:02 caml:02 blank:97 blank:97 python:02 let:03 indentation:04 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 Thank you for this great utility! I'd like to know what emac configuration users have. Hopefully we can work towards a good sample file which could be included in the distribution. Currently I use: ;;behaves like vim's autoindent (defun caml+twt-calculate-indentation () (save-excursion (beginning-of-line) (if (bobp) =09 ;;If this is the first line then it should be set to 0 =09 0 (forward-line -1) =09 ;;Begin navigating to find the first previous non blank line... (while (and (not (bobp)) (looking-at "[:blank:]*\n")) =09 (forward-line -1)) (current-indentation) ) )) ;;Ripped of python.el hopefully we will be able to circle through tab indentation ;;level someday (defun caml+twt-indent-line () (let ((target (caml+twt-calculate-indentation)) =09(pos (- (point-max) (point)))) (if (=3D target (current-indentation)) =09(if (< (current-column) (current-indentation)) =09 (back-to-indentation)) (beginning-of-line) (delete-horizontal-space) (indent-to target) (if (> (- (point-max) pos) (point)) =09 (goto-char (- (point-max) pos)))))) (define-derived-mode caml+twt-mode tuareg-mode "tuareg twt mode" (setq indent-line-function 'caml+twt-indent-line) (setq indent-tabs-mode 'nil) ) ;;(autoload 'caml+twt-mode "caml+twt" "Major mode for editing Ocaml+twt cod= e" t) (add-to-list 'auto-mode-alist '("\\.twt" . caml+twt-mode)) Cheers, Till Varoquaux P.S.: please be tolerant these are my first elisp lines ever...