Skip to content

Commit c4d6901

Browse files
committed
Fix wording about fixed indentation
Originally I hadn't noticed the exception for data lists.
1 parent a889b9c commit c4d6901

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

README.adoc

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -334,22 +334,33 @@ a few examples:
334334
----
335335
336336
This suggestion has certainly gotten some ground in the community, but it also
337-
goes against the entire Lisp tradition and the primary goal of this style guide -
337+
goes against much of the Lisp tradition and one of the primary goals of this style guide -
338338
namely to optimize code for human consumption.
339339
340-
There's also one small caveat with fixed indentation that's rarely discussed and that's
341-
how to indent list literals, as function calls are simply list literals. As those
342-
are not very common in Clojure, outside the context of providing structure for the Clojure
343-
code itself, that matter is usually omitted from consideration:
340+
There's one exception to the fixed indentation rule - data lists (those that are not a function invocation):
344341
345342
[source,clojure]
346343
----
347344
;;; Fixed Indentation
348345
;;
349346
;; list literals
347+
;; we still do
348+
(1
349+
2
350+
3
351+
4
352+
5
353+
6)
354+
355+
;; and
356+
(1 2 3
357+
4 5 6)
358+
359+
;; instead of
350360
(1 2 3
351361
4 5 6)
352362
363+
;; or
353364
(1
354365
2
355366
3
@@ -358,7 +369,7 @@ code itself, that matter is usually omitted from consideration:
358369
6)
359370
----
360371
361-
That looks a bit weird and happens to be inconsistent with how other collection types are normally indented.
372+
This makes sure that lists are consistent with how other collection types are normally indented.
362373
363374
****
364375

0 commit comments

Comments
 (0)