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 BC9C0BC29 for ; Fri, 11 Aug 2006 20:23:00 +0200 (CEST) Received: from mtaout-a.tc.umn.edu (mtaout-a.tc.umn.edu [134.84.119.206]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k7BIMxfI007434 for ; Fri, 11 Aug 2006 20:23:00 +0200 Received: from [128.101.189.129] (glu02.cs.umn.edu [128.101.189.129]) by mtaout-a.tc.umn.edu with ESMTP for caml-list@yquem.inria.fr; Fri, 11 Aug 2006 13:22:05 -0500 (CDT) X-Umn-Remote-Mta: [N] glu02.cs.umn.edu [128.101.189.129] #+LO+TS+AU+HN Message-ID: <44DCCACC.2090204@cs.umn.edu> Date: Fri, 11 Aug 2006 13:22:04 -0500 From: Christopher Kauffman User-Agent: Mozilla Thunderbird 1.0.8 (X11/20060725) X-Accept-Language: en-us, en MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: ocaml-emacs mode with multiline comments Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 44DCCB03.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; multiline:01 ocaml:01 emacs:01 ocaml:01 emacs:01 multiline:01 ocaml-mode:01 experimented:01 prefered:01 ocaml-mode:01 tuareg:01 pointers:01 cheers:01 enjoyment:98 stays:98 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=none autolearn=disabled version=3.0.3 I have been developing for a few months with ocaml and find it adds a lot enjoyment to programming. One small irritation that has bothered me for a while is the handling of comments in the default emacs mode 'ocaml-mode' that comes with the ocaml installation. I may have a setting wrong in my customization of emacs, but multiline comments never seem to maintain a consisten color. Usually I will start comment using the default keystroke M-; (which produces '(* *)') and proceed to type in the commented area. The first line stays the color of a comment as determined by the font-lock settings but when I hit enter to go to the next line and indent, the coloring reverts to the standard non-comment colors. Using the 'fill-paragraph' command (M-q) usually gets the whole multiline comment to turn the comment color, but it seems that this shouldn't be required. Also, there is no smart 'fill-paragraph' for ocaml-mode so that program code will be filled in with the comments if there is not a blank line separating them. I have experimented a bit with Tuareg-mode, the alternate mode for ocaml editing, and it did solve this, but I prefered the indenting in the default ocaml-mode and Tuareg seemd to have trouble with font colors for functions with labels. There seem to be a number of similar discussions between the two emacs modes in the archives on this list but I couldn't locate anything that dealt with these specific issues, the multiline comments and comment filling, in ocaml-mode. If anyone has pointers to other discussion or tips, please enlighten me. Cheers, Chris