| Message ID | 20230428191905.13860-5-paren@disroot.org |
|---|---|
| State | New |
| Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org>
X-Original-To: patchwork@mira.cbaines.net
Delivered-To: patchwork@mira.cbaines.net
Received: by mira.cbaines.net (Postfix, from userid 113)
id ED7E027BBEA; Fri, 28 Apr 2023 20:20:53 +0100 (BST)
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net
X-Spam-Level:
X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID,
DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,
URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6
Received: from lists.gnu.org (lists.gnu.org [209.51.188.17])
by mira.cbaines.net (Postfix) with ESMTPS id 4610A27BBE2
for <patchwork@mira.cbaines.net>; Fri, 28 Apr 2023 20:20:53 +0100 (BST)
Received: from localhost ([::1] helo=lists1p.gnu.org)
by lists.gnu.org with esmtp (Exim 4.90_1)
(envelope-from <guix-patches-bounces@gnu.org>)
id 1psTdp-0002ag-Pp; Fri, 28 Apr 2023 15:20:25 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
id 1psTdT-0002PS-W7
for guix-patches@gnu.org; Fri, 28 Apr 2023 15:20:05 -0400
Received: from debbugs.gnu.org ([209.51.188.43])
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
id 1psTdS-0004CN-HT
for guix-patches@gnu.org; Fri, 28 Apr 2023 15:20:03 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1psTdS-00063B-D6
for guix-patches@gnu.org; Fri, 28 Apr 2023 15:20:02 -0400
X-Loop: help-debbugs@gnu.org
Subject: [bug#63135] [PATCH v2 4/5] dir-locals: Fix MATCH-RECORD indentation.
Resent-From: "(" <paren@disroot.org>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: guix-patches@gnu.org
Resent-Date: Fri, 28 Apr 2023 19:20:02 +0000
Resent-Message-ID: <handler.63135.B63135.168270956023123@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 63135
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 63135@debbugs.gnu.org
Cc: "\(" <paren@disroot.org>, Josselin Poiret <dev@jpoiret.xyz>
Received: via spool by 63135-submit@debbugs.gnu.org id=B63135.168270956023123
(code B ref 63135); Fri, 28 Apr 2023 19:20:02 +0000
Received: (at 63135) by debbugs.gnu.org; 28 Apr 2023 19:19:20 +0000
Received: from localhost ([127.0.0.1]:34534 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
id 1psTcm-00060n-6s
for submit@debbugs.gnu.org; Fri, 28 Apr 2023 15:19:20 -0400
Received: from knopi.disroot.org ([178.21.23.139]:41590)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <paren@disroot.org>) id 1psTck-000608-5B
for 63135@debbugs.gnu.org; Fri, 28 Apr 2023 15:19:18 -0400
Received: from localhost (localhost [127.0.0.1])
by disroot.org (Postfix) with ESMTP id A32E840274;
Fri, 28 Apr 2023 21:19:17 +0200 (CEST)
X-Virus-Scanned: SPAM Filter at disroot.org
Received: from knopi.disroot.org ([127.0.0.1])
by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id Z-0VSZKiypH3; Fri, 28 Apr 2023 21:19:16 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;
t=1682709556; bh=RQOqLPb86/6MOEVAHzd6IhmBJjOyLl+ukQRIqgZf3aw=;
h=From:To:Cc:Subject:Date:In-Reply-To:References;
b=kY1H9jUQ8yJLSXlM0ICIB770OzrGrAy9BbzkfZGtlkkN6WSAMv2Az2YTQAZpxvWzi
sJiE13uxwD2I/Da5eJfPjuGlKPD73hCin2ZUnkfBHCyYV6p2PyvhqJK0PebIoyLxk0
crPjsHfKrN0wp3/eQHC9pG8evnJIV0yOHuzw+U2RElKyPbni2Ffib8zsMMTYck5Cyg
0BCCHxJFpoFB4uYKiQHjvanKfpgpjEloh7fkYbuAybqGPZuTQ5u9GBaA7O7NyYJ3Md
+JNwvX94mwO8ZN4GuQVShgCmVbGoEydRPRTYf2tlO+nYw7aegAEapByTBWgegla7CE
9A1ujTqB0LuqQ==
Date: Fri, 28 Apr 2023 20:19:04 +0100
Message-Id: <20230428191905.13860-5-paren@disroot.org>
In-Reply-To: <20230428191905.13860-1-paren@disroot.org>
References: <20230428191905.13860-1-paren@disroot.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-BeenThere: guix-patches@gnu.org
List-Id: <guix-patches.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>,
<mailto:guix-patches-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/guix-patches>
List-Post: <mailto:guix-patches@gnu.org>
List-Help: <mailto:guix-patches-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>,
<mailto:guix-patches-request@gnu.org?subject=subscribe>
Reply-to: "\(" <paren@disroot.org>
X-ACL-Warn: , "\( via Guix-patches" <guix-patches@gnu.org>
From: "\( via Guix-patches" via <guix-patches@gnu.org>
Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org
Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org
X-getmail-retrieved-from-mailbox: Patches
|
| Series |
MATCH-RECORD improvements
|
|
Commit Message
\(
April 28, 2023, 7:19 p.m. UTC
* .dir-locals.el: Treat the fourth form onwards as the body, rather than the third onwards. --- .dir-locals.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
"(" <paren@disroot.org> skribis:
> * .dir-locals.el: Treat the fourth form onwards as the body, rather than
> the third onwards.
Hmm that’s “incorrect”, no?
Currently we have:
(match-record x <x>
(field1 field2 …)
body …)
Do you mean to move the field list on the first line?
Ludo’.
Ludovic Courtès <ludo@gnu.org> writes: > Hmm that’s “incorrect”, no? > > Currently we have: > > (match-record x <x> > (field1 field2 …) > body …) > > Do you mean to move the field list on the first line? Wait, that's intentional? :) With this change, wouldn't it be: ``` (match-record x <x> (field1 field2) body ...) ``` which seems more in line with how other macros with bodies are typically indented.
"(" <paren@disroot.org> skribis:
> Ludovic Courtès <ludo@gnu.org> writes:
>> Hmm that’s “incorrect”, no?
>>
>> Currently we have:
>>
>> (match-record x <x>
>> (field1 field2 …)
>> body …)
>>
>> Do you mean to move the field list on the first line?
>
> Wait, that's intentional? :) With this change, wouldn't it be:
>
> ```
> (match-record x <x>
> (field1 field2)
> body ...)
> ```
>
> which seems more in line with how other macros with bodies are typically
> indented.
Ah! Dunno, to me the version you’re showing here looks “less natural”
because it’s a departure from ‘match’, which was the model here.
I understand this is all rather subjective…
Ludo’.
Ludovic Courtès <ludo@gnu.org> writes: > Ah! Dunno, to me the version you’re showing here looks “less natural” > because it’s a departure from ‘match’, which was the model here. > > I understand this is all rather subjective… To me, the current indentation conflates the fields expression with the body, which could be confusing for someone who'd never seen a MATCH-RECORD form before. -- (
Hi,
"(" <paren@disroot.org> skribis:
> Ludovic Courtès <ludo@gnu.org> writes:
>> Ah! Dunno, to me the version you’re showing here looks “less natural”
>> because it’s a departure from ‘match’, which was the model here.
>>
>> I understand this is all rather subjective…
>
> To me, the current indentation conflates the fields expression with the
> body, which could be confusing for someone who'd never seen a
> MATCH-RECORD form before.
Hmm yeah, that makes sense.
I’m fine with changing then, as long as ‘.dir-locals.el’ and (guix
read-print) implement the same rule.
Ludo’.
Ludovic Courtès <ludo@gnu.org> writes: > I’m fine with changing then, as long as ‘.dir-locals.el’ and (guix > read-print) implement the same rule. Ah, good point :)
diff --git a/.dir-locals.el b/.dir-locals.el index a5f627a9ba..3ffd25ee94 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -70,7 +70,7 @@ (eval . (put 'guard 'scheme-indent-function 1)) (eval . (put 'lambda* 'scheme-indent-function 1)) (eval . (put 'substitute* 'scheme-indent-function 1)) - (eval . (put 'match-record 'scheme-indent-function 2)) + (eval . (put 'match-record 'scheme-indent-function 3)) ;; TODO: Contribute these to Emacs' scheme-mode. (eval . (put 'let-keywords 'scheme-indent-function 3))