From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#2160: 23.0.60; Indentation of LOOP (cl-indent.el) Date: Thu, 30 Apr 2020 18:19:38 +0200 Message-ID: <87zhat54kl.fsf@stefankangas.se> References: <87ab956pyk.fsf@freebits.de> <87pnjifc4o.fsf@gnus.org> <87o8ti86r3.fsf@stefankangas.se> <8736ab15ww.fsf@gnus.org> <87o8sq4hbz.fsf@stefankangas.se> <87imhh3779.fsf@gnus.org> <878sid77r5.fsf@stefankangas.se> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="66711"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: tcr@freebits.de, 2160@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 30 18:27:43 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jUC2J-000HEV-9r for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Apr 2020 18:27:43 +0200 Original-Received: from localhost ([::1]:48184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUC2I-0008AF-5a for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Apr 2020 12:27:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47920) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUBuu-0006iU-1a for bug-gnu-emacs@gnu.org; Thu, 30 Apr 2020 12:20:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUBut-00062e-8d for bug-gnu-emacs@gnu.org; Thu, 30 Apr 2020 12:20:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35990) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jUBus-00062O-OM for bug-gnu-emacs@gnu.org; Thu, 30 Apr 2020 12:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jUBus-00021N-Er for bug-gnu-emacs@gnu.org; Thu, 30 Apr 2020 12:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 30 Apr 2020 16:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 2160 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 2160-submit@debbugs.gnu.org id=B2160.15882635957744 (code B ref 2160); Thu, 30 Apr 2020 16:20:02 +0000 Original-Received: (at 2160) by debbugs.gnu.org; 30 Apr 2020 16:19:55 +0000 Original-Received: from localhost ([127.0.0.1]:47536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUBug-00020j-FF for submit@debbugs.gnu.org; Thu, 30 Apr 2020 12:19:55 -0400 Original-Received: from ted.gofardesign.uk ([67.225.143.91]:54270) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUBud-00020J-Fm for 2160@debbugs.gnu.org; Thu, 30 Apr 2020 12:19:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=XuEDyejZt88qO9gzkGg7QjYMaWGVuHgNH7JZkM+ZX3s=; b=QvLTSbrG1XABTDw7Ji/tjB4BUh rGzfeXraw3MbkA4EkvGKPhEJ/N3gmYFfB6QSZnJSvQ7sRzi+bLV46avcOElHf26sbJ0NyvRnWJ4+H 4PBlJziqa5kFJvqCZ5pv09tvy+Fye/rOEiP2xHqRG7WwNS3uuI/sMfRlt+3Dkp3C+BbxMlnTm30O3 EC/CO7TUALr2FEk/4uUV+TkTt22a4pfoKRbQ0+IVw6KP+eWMgE8sJkoUYFayICZZzz4tbRkqpjexJ hLWdijWnL76Du/VhqXbBsqSwYoc8XR3kFnWkbRRAKyZ/ovQEEfi8JtnY+qj8VpPs6dLJzq/v/tVDS 1qPIviBg==; Original-Received: from h-4-70-69.a785.priv.bahnhof.se ([155.4.70.69]:47170 helo=localhost) by ted.gofardesign.uk with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jUBuV-0004cO-QT; Thu, 30 Apr 2020 12:19:40 -0400 In-Reply-To: <878sid77r5.fsf@stefankangas.se> (Stefan Kangas's message of "Thu, 30 Apr 2020 09:27:58 +0200") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ted.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: ted.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: ted.gofardesign.uk: stefan@marxist.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:179391 Archived-At: --=-=-= Content-Type: text/plain Stefan Kangas writes: > Lars Ingebrigtsen writes: > >> The former looks like what I'd expect (as a Common Lisp programmer). >> Except that I would never ever do a newline after "(loop ". > > OK, thanks. Let's push to master then. Please find attached the patch I suggest. I'll allow a couple of days before I push it in case anyone has any comments. Best regards, Stefan Kangas --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Improve-indentation-of-loop-forms.patch >From e8d3cb1601e9b83e743090f493befae103745fc9 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 30 Apr 2020 18:11:28 +0200 Subject: [PATCH] Improve indentation of 'loop' forms * lisp/emacs-lisp/cl-indent.el (lisp-loop-keyword-indentation) (lisp-loop-forms-indentation, lisp-simple-loop-indentation): Use a more standard indentation of 'loop' forms. (Bug#2160) (lisp-indent-maximum-backtracking, lisp-tag-indentation) (lisp-tag-body-indentation, lisp-backquote-indentation) (lisp-loop-keyword-indentation, lisp-loop-forms-indentation) (lisp-simple-loop-indentation): Remove redundant :group args. --- lisp/emacs-lisp/cl-indent.el | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/lisp/emacs-lisp/cl-indent.el b/lisp/emacs-lisp/cl-indent.el index fd8715962a..361414ef1f 100644 --- a/lisp/emacs-lisp/cl-indent.el +++ b/lisp/emacs-lisp/cl-indent.el @@ -46,14 +46,12 @@ lisp-indent-maximum-backtracking "Maximum depth to backtrack out from a sublist for structured indentation. If this variable is 0, no backtracking will occur and forms such as `flet' may not be correctly indented." - :type 'integer - :group 'lisp-indent) + :type 'integer) (defcustom lisp-tag-indentation 1 "Indentation of tags relative to containing list. This variable is used by the function `lisp-indent-tagbody'." - :type 'integer - :group 'lisp-indent) + :type 'integer) (defcustom lisp-tag-body-indentation 3 "Indentation of non-tagged lines relative to containing list. @@ -64,32 +62,30 @@ lisp-tag-body-indentation as a block at the same indentation as the first s-expression following the tag. In this case, any forms before the first tag are indented by `lisp-body-indent'." - :type 'integer - :group 'lisp-indent) + :type 'integer) (defcustom lisp-backquote-indentation t "Whether or not to indent backquoted lists as code. If nil, indent backquoted lists as data, i.e., like quoted lists." - :type 'boolean - :group 'lisp-indent) + :type 'boolean) -(defcustom lisp-loop-keyword-indentation 3 +(defcustom lisp-loop-keyword-indentation 6 "Indentation of loop keywords in extended loop forms." :type 'integer - :group 'lisp-indent) + :version "28.1") -(defcustom lisp-loop-forms-indentation 5 +(defcustom lisp-loop-forms-indentation 6 "Indentation of forms in extended loop forms." :type 'integer - :group 'lisp-indent) + :version "28.1") -(defcustom lisp-simple-loop-indentation 3 +(defcustom lisp-simple-loop-indentation 1 "Indentation of forms in simple loop forms." :type 'integer - :group 'lisp-indent) + :version "28.1") (defcustom lisp-lambda-list-keyword-alignment nil "Whether to vertically align lambda-list keywords together. -- 2.26.2 --=-=-=--