Skip to content

Commit

Permalink
Remove indent mac from ppr.arc
Browse files Browse the repository at this point in the history
  • Loading branch information
shader committed Jan 29, 2012
1 parent 313f77b commit e7a95ac
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions load/ppr.arc
Expand Up @@ -29,16 +29,12 @@

(= oneline* 45)

(mac indent (col . body)
`(do (unless noindent sp.col)
,@body))

(mac ppr-sub body
`(indent col
(let whole (tostring print.x)
(if (< len.whole oneline*)
(do pr.whole nil)
(do ,@body t)))))
`(do (unless noindent sp.col)
(let whole (tostring print.x)
(if (< len.whole oneline*)
(do pr.whole nil)
(do ,@body t)))))

(def indent-pairs (xs (o col 0))
(let l (apply max 0 (map len:tostring:print:car (keep cdr pair.xs)))
Expand Down Expand Up @@ -130,7 +126,7 @@
(def ppr-main (x (o col 0) (o noindent nil))
" Recursive main body of the ppr function. "
(aif (or atom.x dotted.x) ;just print the expression if it's an atom or dotted list
(indent col
(do (unless noindent sp.col)
print.x
nil)
(is car.x 'make-br-fn) ;if the expression is a br-fn, print the brackets and then the contents
Expand Down

0 comments on commit e7a95ac

Please sign in to comment.