From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA14787; Tue, 8 Apr 2003 17:44:58 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA14930 for ; Tue, 8 Apr 2003 17:44:36 +0200 (MET DST) Received: from comtv.ru (comtv.ru [217.10.32.4]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h38FiZ924918 for ; Tue, 8 Apr 2003 17:44:36 +0200 (MET DST) Received: from [10.0.66.9] ([10.0.66.9] verified) by comtv.ru (CommuniGate Pro SMTP 4.0.6) with ESMTP id 8237273; Tue, 08 Apr 2003 19:43:48 +0400 Date: Tue, 8 Apr 2003 19:45:25 +0400 (MSD) From: malc X-X-Sender: malc@home.oyster.ru To: Damien cc: caml-list@inria.fr Subject: Re: [Caml-list] single-line comment request In-Reply-To: <20030408172805.164bcf63.Damien.Pous@ens-lyon.fr> Message-ID: References: <200304081756.05304.snob@snob.spb.ru> <20030408172805.164bcf63.Damien.Pous@ens-lyon.fr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam: no; 0.00; malc:01 pulsesoft:01 caml-list:01 damien:01 nickolay:01 weis:01 defun:01 end-of-line:01 ocaml:01 lisp:01 emacs:01 wrote:03 let:04 arg:06 guess:06 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, 8 Apr 2003, Damien wrote: > On Tue, 8 Apr 2003 17:56:05 +0500 Nickolay Semyonov-Kolchin wrote: > > Hi, > hello > > > I really want single-line comment in Ocaml. Peter Weis (sorry, if I > > typed name wrong) several time ago said that "there is no suitable > > character for single line comment". Why don't use double '#'? I.e. > > '##'. ## Single line comment > > let _ = ## Another single line comment > > ... > maybe some emacs/vi guru could write a shortcut that [un]comment a > single line... > I am not used to Lisp, but I guess it shouldn't be difficult. (defun caml-comment-till-end-of-line (&optional arg) (interactive "P") (save-excursion (if (looking-at search-whitespace-regexp) (re-search-forward search-whitespace-regexp)) (comment-region (point) (progn (end-of-line) (point)) arg))) (global-set-key [(alt ?\;)] 'caml-comment-till-end-of-line) C-; - comment C-u C-; - reverse -- mailto:malc@pulsesoft.com ------------------- 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