Skip to content

sift 1.29.1 — a loop is clauses, and Emacs was right

Choose a tag to compare

@jjba23 jjba23 released this 13 Nov 16:57
· 34 commits to trunk since this release
247c45b

Issue #9, all three findings, from one fact that sift only had in the
formatter: a form whose elements are clauses is not a call with arguments.

Formatting. loop was indented two columns in from the opener in both
Emacs Lisp and Common Lisp, where Emacs lines every clause up under the first
one. The clauses rule that cond already used now applies to loop too:
for, with and do sit in one column, and a (loop with nothing after it
still indents its clauses two in.

A file formatted by an older sift is reformatted once:

sift format --write

SIFT009 (duplicate-keyword) no longer reports a loop: every keyword of
a loop starts a clause, so :of-type written twice declares the type of two
different variables, and two :do clauses both run. A duplicate inside a
loop's clause is still a duplicate.

SIFT031 (wrap-in-let) no longer counts a clause list as one long
expression. A many-clause cond had the same problem and is fixed with it;
the depth rule still applies to a clause.

The one predicate behind the two checks is clause-headed?, exported from
(sift format) beside the clause-taking-forms table it belongs with, so a
clause-shaped form added there is understood by the formatter and the checkers
at once. SIFT009 had no test suite until now; it has one.

Full Changelog: v1.29.0...v1.29.1