From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id E0C28BC6B for ; Sat, 30 Jun 2007 18:57:50 +0200 (CEST) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.224]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5UGvnJt002100 for ; Sat, 30 Jun 2007 18:57:50 +0200 Received: by wx-out-0506.google.com with SMTP id h28so417038wxd for ; Sat, 30 Jun 2007 09:57:49 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Dx78f+GPXSMh/J4ZnFLA0a0Eq/QETBBXN9cpTW/zgkh+2m3228Bwp2IiAEnMG1b48YItcbR0YALSa5Emg/S6B0OALCZSUryqayk+iOXoFPBzwvmMIzqBV+UaDu5IP9Js7HFFRkHVwj6BhvI9y+PGb5Da7aP3qubZsBYP8gIhSXc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=kKC3Acz/BdPNjsPiD9fbHNiR10fK6gtxI2ay/+Q+Jqb9OhAnu64F97XhuB1chQq/mCMjDLnrhfRiw/+bTiURwO0NYNPnhn3t3PaHRRDO9EXEb13PgxPuZEnHmhlU6IA8aeKDttQof3JXPNLG1+Fk+076Qi19E9Ixh+j9a8G3yII= Received: by 10.90.69.8 with SMTP id r8mr4101893aga.1183222669716; Sat, 30 Jun 2007 09:57:49 -0700 (PDT) Received: by 10.90.101.16 with HTTP; Sat, 30 Jun 2007 09:57:49 -0700 (PDT) Message-ID: <6dbd4d000706300957q58f5a758s3e6b42f14ebdc114@mail.gmail.com> Date: Sat, 30 Jun 2007 10:57:49 -0600 From: "Denis Bueno" To: "OCaml Mailing List" Subject: Adding another "let ... in"-like construct for fontification/indentation MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-j-chkmail-Score: MSGID : 46868B8E.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 46868B8E.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; -like:01 def:01 emacs:01 tuareg:01 foo:01 def:01 foo:01 tuareg:01 regexp:01 regexp:01 jocaml:01 syntax:01 syntax:01 jocaml:01 ...,:98 All, In tuareg-mode, is there a simple way to add support for indentation for a new syntactic construct that behaves exactly like "let ... in ..."? I'd like "def ... in ..." to behave the same way. I'm thinking of some code I can stuff in my .emacs, hopefuly, as opposed to a modification of tuareg.el. I'd like to be able to write: let foo a b = a + b in def hi(x) = print_int x; 0 in let bar x = x in i.e. I'd like to interleave let .. in ... and def ... in ..., and have them cooperate. I looked around tuareg.el and found a bunch of places where "let" is mentioned in a regexp, and even found `tuareg-make-find-kwop-regexp', whose doc string says "Make a custom indentation regexp". That doc string seems like it's what I want, but that function has no side effects, so clearly it's not the whole story. What I'm eventually shooting for is a tuareg mode that "knows" about Jocaml syntax, since I'm fiddling around with that for the moment. There are more new pieces of syntax on Jocaml (new keywords "spawn" and "reply to") which seem pretty simple to support, but I haven't thought about them very much. Thanks in advance. -- Denis