GNU bug report logs - #2160
23.0.60; Indentation of LOOP (cl-indent.el)

Previous Next

Package: emacs;

Reported by: tcr <at> freebits.de

Date: Mon, 2 Feb 2009 11:35:03 UTC

Severity: wishlist

Tags: patch

Fixed in version 28.1

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


Message #15 received at 2160 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: tcr <at> freebits.de, 2160 <at> debbugs.gnu.org
Subject: Re: bug#2160: 23.0.60; Indentation of LOOP (cl-indent.el)
Date: Sat, 29 Feb 2020 03:30:40 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> tcr <at> freebits.de writes:
>
>> When using `common-lisp-indent-function', LOOP forms are by default
>> indented as follows
>>
>>   (loop for x in '(a b c)
>>      for y in '(1 2 3)
>>      collect (cons x y))
>
> (I'm going through old bug reports that unfortunately didn't get any
> response at the time.)
>
> This is still the case in Emacs 27.
>
>> Setting the following
>>
>>   (setq lisp-simple-loop-indentation 1
>>         lisp-loop-keyword-indentation 6
>>         lisp-loop-forms-indentation 6)
>>
>> makes it be indented like
>>
>>   (loop for x in '(a b c)
>>         for y in '(1 2 3)
>>         collect (cons x y))
>>
>> which I think is more readable, and more canonical.
>>
>> I hence propose to change the default values in cl-indent.el of the
>> above variables accordingly.
>
> I agree that changing the default here would be a good idea, because
> that's a very non-standard Common Lisp indentation.  Does anybody object
> to changing it?

No further comments within 21 weeks, so I'll just chime in to say the
suggestion makes sense to me.  It seems to be the usual indentation in
the Common Lisp world, and I see no reason to do things differently.
It certainly makes the code more readable.

People have had ample time to protest, so perhaps we should just go
ahead and make the change on the master branch.

Best regards,
Stefan Kangas




This bug report was last modified 5 years and 102 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.