From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id 78E087ED26 for ; Fri, 25 May 2012 08:13:54 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao4CABEiv08machzl2dsb2JhbABEDqJLkiMqAQEBAQEIFgc7ghUBAQEEEgIsAQEsCwEPCwsNDSEiEgEFAQoSBhMJCQkHh10DCwMBB50ICQOKZIQuAQWFNAOJUgaKf4VGlRuBD40GPYNFOg X-IronPort-AV: E=Sophos;i="4.75,655,1330902000"; d="scan'208";a="159912191" Received: from mx2.janestreet.com (HELO nyc-dmz-mxout2.janestreet.com) ([38.105.200.115]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 25 May 2012 08:13:53 +0200 Received: from nyc-qsv-mail1.delacy.com ([172.25.22.57]) by nyc-dmz-mxout2.janestreet.com with esmtp (Exim 4.76) (envelope-from ) id 1SXnmZ-0005kp-4w for caml-list@inria.fr; Fri, 25 May 2012 02:13:51 -0400 Received: from nyc-dmz-mxgoog1.delacy.com ([172.25.224.109] helo=mxgoog1.janestreet.com) by nyc-qsv-mail1.delacy.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1SXnmZ-0000LG-3D for caml-list@inria.fr; Fri, 25 May 2012 02:13:51 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]) by mxgoog1.janestreet.com with esmtp (Exim 4.76) (envelope-from ) id 1SXnmY-0004cQ-VD for caml-list@inria.fr; Fri, 25 May 2012 02:13:51 -0400 Received: by wibhn14 with SMTP id hn14so6134928wib.17 for ; Thu, 24 May 2012 23:13:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=CRMcz7vUUgIZ8dakPZF06jMM0h0zr5kqYT6N/cgSR0M=; b=HQ0B+Kp8LhulkqzIz/NRptqqe/acOQcREAX9tvk47JNFT3OUiDo/dkg4OL3RSpOuXR 0TqPX0fNB96PJg22xk4DXvEaMFyYoS5koQgwVbWG3GtR2h8DZ5ffDxgkwjtTbuvKvBxq 0Ox9Mqy15PS1NTxI7sCjFncOXibfep+KFU16w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=CRMcz7vUUgIZ8dakPZF06jMM0h0zr5kqYT6N/cgSR0M=; b=FuuZlaN1rQlpq+FFa+wixbRI4EgM4nZe8a3S6d2qhYE0kBelZipMSscAWAEha2uqos V/qBZH7svtmaSpq/y0I31h2uM4DHBJtZs9CZMLZ9tk+LP7R7jwOSBAwOY3e+sYP0RlVn XVbZJk51sjCyqIZl7h22WH9HBkXDy3lWrBIxUkyoFEJeaA3lRu3H0AihHSVDMmRksHnT NWT9yfGLmU40d6uWlFIrl6jhJucJDTL46+khVyZ5Ev2Za0GpzjUDlEL49VXP7VyIbrTu JANNUtJTfC+uHR4DleSZkRM2FtsWujr14UgwmlGgBNLjG2UQhmz6HVvcQgl5KzvWrOyh uvjg== MIME-Version: 1.0 Received: by 10.216.228.98 with SMTP id e76mr1001026weq.150.1337926430089; Thu, 24 May 2012 23:13:50 -0700 (PDT) Received: by 10.180.106.105 with HTTP; Thu, 24 May 2012 23:13:50 -0700 (PDT) X-Originating-IP: [80.169.196.210] In-Reply-To: <20120524.220613.1066733202670535323.Christophe.Troestler@umons.ac.be> References: <20120523.225137.2235002212124282451.Christophe.Troestler@umons.ac.be> <4FBD564E.9010101@dogguy.org> <20120524.104708.916458905184337628.Christophe.Troestler@umons.ac.be> <20120524.220613.1066733202670535323.Christophe.Troestler@umons.ac.be> Date: Fri, 25 May 2012 07:13:50 +0100 Message-ID: From: David House To: Christophe TROESTLER Cc: OCaml Mailing List Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQnkhmwuhFm+uOtmQRSWBVQdRtsxQCLk93xn06i7xSfK6jP0LhTzxATVqrbnr3/F+kdqHC6i Subject: Re: [Caml-list] Re: [Announce] New release of tuareg mode I have C-; for a custom function called comment-current-line. It's probably one of my most used custom functions. I do use M-; to insert comments at the end of nonblank lines, albeit rarely, so I would probably stick with my curernt solution. On Thu, May 24, 2012 at 9:06 PM, Christophe TROESTLER wrote: > Hi, > > By default, Emacs binds M-; to comment-dwim -- a powerful commenting > macro. However, to alleviate the absence of single line comment in > OCaml, I am thinking to bind M-; in tuareg instead to the following > variant: > > (defun comment-dwim-line (&optional arg) > "Replacement for the comment-dwim command. > If no region is selected and current line is not blank and we are > not at the end of the line, then comment current line. Replaces > default behaviour of comment-dwim, when it inserts comment at the > end of the line." > (interactive "*P") > (comment-normalize-vars) > (if (and (not (region-active-p)) (not (looking-at "[ \t]*$"))) > (comment-or-uncomment-region (line-beginning-position) > (line-end-position)) > (comment-dwim arg))) > > (taken from http://www.emacswiki.org/emacs/CommentingCode) to easily > toggle commenting single lines. > > I'd like to know your opinion. Do you think (or not) it would be a > useful default? > > Best, > C. > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa-roc.inria.fr/wws/info/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >