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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 4B3A38239C for ; Tue, 21 Nov 2017 20:57:34 +0100 (CET) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=monnier@IRO.UMontreal.CA; spf=SoftFail smtp.mailfrom=monnier@iro.umontreal.ca; spf=None smtp.helo=postmaster@pruche.dit.umontreal.ca Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of monnier@IRO.UMontreal.CA) identity=pra; client-ip=132.204.246.22; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="monnier@iro.umontreal.ca"; x-sender="monnier@IRO.UMontreal.CA"; x-conformance=sidf_compatible Received-SPF: SoftFail (mail3-smtp-sop.national.inria.fr: domain of monnier@iro.umontreal.ca is inclined to not designate 132.204.246.22 as permitted sender) identity=mailfrom; client-ip=132.204.246.22; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="monnier@iro.umontreal.ca"; x-sender="monnier@iro.umontreal.ca"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@pruche.dit.umontreal.ca) identity=helo; client-ip=132.204.246.22; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="monnier@iro.umontreal.ca"; x-sender="postmaster@pruche.dit.umontreal.ca"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AaJuF2xF2Jz92vGOin+oEWZ1GYnF86YWxBRYc798d?= =?us-ascii?q?s5kLTJ76oc+wAkXT6L1XgUPTWs2DsrQf1LqQ7viocFdDyKjCmUhKSIZLWR4BhJ?= =?us-ascii?q?detC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TXhpQIVTx72MA4w?= =?us-ascii?q?IuXuBqbTid623qa84c79eQJN0QGhbL17Kl2TqgPXt8QMyd9nLaA3yxbTilpyXK?= =?us-ascii?q?Jr4GRuOUielhK6ze7mr80ryDhZp/90r50Iaq79ZaltFbE=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0B6AQDshBRahxb2zIRbHAEBAQQBAQoBA?= =?us-ascii?q?YQSfo85jjeBfZhzilBDFAEBAQEBAQEBAQESAQEBCgsJCCgvgjgigkUBBAEnVws?= =?us-ascii?q?LRhQYK4ozCKpNOosngzSCB4ZphFqBDYUsBZMIhhqJHKhZl282ghY0IQgygy6Ca?= =?us-ascii?q?yWBbIwLAQEB?= X-IPAS-Result: =?us-ascii?q?A0B6AQDshBRahxb2zIRbHAEBAQQBAQoBAYQSfo85jjeBfZh?= =?us-ascii?q?zilBDFAEBAQEBAQEBAQESAQEBCgsJCCgvgjgigkUBBAEnVwsLRhQYK4ozCKpNO?= =?us-ascii?q?osngzSCB4ZphFqBDYUsBZMIhhqJHKhZl282ghY0IQgygy6CayWBbIwLAQEB?= X-IronPort-AV: E=Sophos;i="5.44,432,1505772000"; d="scan'208";a="245526141" Received: from pruche.dit.umontreal.ca ([132.204.246.22]) by mail3-smtp-sop.national.inria.fr with ESMTP; 21 Nov 2017 20:57:31 +0100 Received: from lechazo.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id vALJvUJE010632; Tue, 21 Nov 2017 14:57:30 -0500 Received: by lechazo.home (Postfix, from userid 20848) id 52B376024D; Tue, 21 Nov 2017 14:59:15 -0500 (EST) From: Stefan Monnier To: caml-list@inria.fr Message-ID: References: <6c2af6b6-2f9f-7f12-2bbf-22b1286d29d5@matej-kosik.net> Date: Tue, 21 Nov 2017 14:59:15 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6163=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6163> : inlines <6179> : streams <1770957> : uri <2537982> X-Validation-by: monnier@iro.umontreal.ca Subject: Re: [Caml-list] What is the right way to configure Tuareg to get the same indentation as in Batteries Included? > match BatEnum.peek enum with > | None -> {re; im = multiplier} > | Some (Kwd ".") > | Some (Kwd "*") -> > BatEnum.junk enum; > parse_im ~multiplier re > | Some _token -> > parse_im ~multiplier re > > However, Tuareg, in my currenct configuration does instead this: > > match BatEnum.peek enum with > | None -> {re; im = multiplier} > | Some (Kwd ".") > | Some (Kwd "*") -> > BatEnum.junk enum; > parse_im ~multiplier re > | Some _token -> > parse_im ~multiplier re Here's how you can do it: - Go to the first line that Tuareg indents wrong (i.e. `| Some (Kwd "*") ->`) - Change its indentation to match your expectation - run `M-x smie-config-set-indent RET` - this should suggest to set (:before "|-or") to 0, which you can accept. - go to the next line (that Tuareg indents wrong) - Change its indentation to match your expectation - run `M-x smie-config-set-indent RET` - this time it asks you which rule you want to change (because 2 rules are used to determine this indentation): either (after "->") or (before "->") depending on whether you want to also change | Some (Kwd "*") -> BatEnum.junk enum; or not. - once that is done, you should be able to do `M-x smie-config-save RET`. To save the result into your Customize settings. Stefan