chiark / gitweb /
Whitespace cleanups across the board.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 20 Dec 2014 22:18:25 +0000 (22:18 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 20 Dec 2014 22:18:25 +0000 (22:18 +0000)
aa-tree.lisp
heap.lisp
infix.lisp
mdw-base.lisp
mdw-mop.lisp
optparse.lisp
str.lisp
sys-base.lisp
unix.lisp

index 3c6067228b6e03c728c2e5cebe175d9d53bc2f4a..6c42746b1c5896c1b611d38e63eabe37a7d9f3b9 100644 (file)
@@ -307,12 +307,12 @@ (defmacro doaa ((key value tree &optional result) &body body)
       (unless key (setf key (gensym "KEY")) (push key ignores))
       (unless value (setf value (gensym "VALUE")) (push value ignores))
       `(block nil
-         (mapaa (lambda (,key ,value)
+        (mapaa (lambda (,key ,value)
                  ,@decls
                  ,@(and ignores `((declare (ignore ,@ignores))))
                  (tagbody ,@body))
-               ,tree)
-         ,result))))
+               ,tree)
+        ,result))))
 
 ;;;--------------------------------------------------------------------------
 ;;; Testing.
index 9f099c068de2d015b0a68235c7df56a4a56c545e..53eb2b83003f3cb6389104161487ac1b0ad26127 100644 (file)
--- a/heap.lisp
+++ b/heap.lisp
@@ -117,7 +117,7 @@ (defstruct (heap (:predicate heapp) (:constructor %make-heap))
 
 (defun make-heap
     (&key (compare #'<=) (key #'identity)
-          (type 't) (init-size 16) (contents nil contentsp))
+         (type 't) (init-size 16) (contents nil contentsp))
   "Return a new heap.
 
    COMPARE is a partial-order predicate: (COMPARE X Y) should return true if
index a77f51ea2c4fc56a6aa6b7e7add96d5efe92dda4..ff5a3c9cd406924a1acce2f49bf005ad4eaa82c4 100644 (file)
@@ -283,7 +283,7 @@ (defmacro defopfunc (op kind &body body)
    the value stack."
   `(progn
      (setf (get ',op ',kind)
-           (lambda () ,@body))
+          (lambda () ,@body))
     ',op))
 
 (defmacro definfix (op prec &body body)
@@ -427,7 +427,7 @@ (defun parse-ident-list ()
   (let ((stuff nil))
     (loop
       (unless (symbolp *token*)
-        (error "expected symbol; found ~S" *token*))
+       (error "expected symbol; found ~S" *token*))
       (push *token* stuff)
       (get-token)
       (unless (delim '|,| nil)
@@ -821,8 +821,8 @@ (testrig "infix" #'test-infix
      (defun foo (x) (- x 6)))
     ("bind x = 3 in x - 2" . (let ((x 3)) (- x 2)))
     ("bind x, y = values(1, 2),
-           z = 3,
-           docs, decls, body = parse-body(body) in complicated" .
+          z = 3,
+          docs, decls, body = parse-body(body) in complicated" .
      (multiple-value-bind (x y) (values 1 2)
        (let ((z 3))
         (multiple-value-bind (docs decls body) (parse-body body)
index 95b79de744d3b6f9968f3b94808010608c2f794d..df2acd31f2577fb0a336e8fe0456dc7d6bb01ae8 100644 (file)
@@ -195,7 +195,7 @@   (defun fixnump (object)
 (defmacro with-gensyms (syms &body body)
   "Everyone's favourite macro helper."
   `(let (,@(mapcar (lambda (sym) `(,sym (gensym ,(symbol-name sym))))
-                   (listify syms)))
+                  (listify syms)))
      ,@body))
 
 (defmacro let*/gensyms (binds &body body)
@@ -204,16 +204,16 @@ (defmacro let*/gensyms (binds &body body)
    each VAR is bound to a gensym, and in the final expansion, each of those
    gensyms will be bound to the corresponding VALUE."
   (labels ((more (binds)
-             (let ((tmp (gensym "TMP")) (bind (car binds)))
-               `((let ((,tmp ,(cadr bind))
-                       (,(car bind) (gensym ,(symbol-name (car bind)))))
-                   `(let ((,,(car bind) ,,tmp))
-                      ,,@(if (cdr binds)
-                             (more (cdr binds))
-                             body)))))))
+            (let ((tmp (gensym "TMP")) (bind (car binds)))
+              `((let ((,tmp ,(cadr bind))
+                      (,(car bind) (gensym ,(symbol-name (car bind)))))
+                  `(let ((,,(car bind) ,,tmp))
+                     ,,@(if (cdr binds)
+                            (more (cdr binds))
+                            body)))))))
     (if (null binds)
-        `(progn ,@body)
-        (car (more (mapcar #'pairify (listify binds)))))))
+       `(progn ,@body)
+       (car (more (mapcar #'pairify (listify binds)))))))
 
 ;;;--------------------------------------------------------------------------
 ;;; Some simple yet useful control structures.
@@ -227,7 +227,7 @@ (defmacro nlet (name binds &body body)
            collect val into vals
            finally (return (values vars vals)))
     `(labels ((,name ,vars
-               ,@body))
+               ,@body))
        (,name ,@vals))))
 
 (defmacro while (cond &body body)
@@ -253,7 +253,7 @@ (compile-time-defun do-case2-like (kind vform clauses)
                               (list `(let ((,(or vary varx) ,argument)
                                            ,@(and vary
                                                   `((,varx ,scrutinee))))
-                                       ,@forms))
+                                       ,@forms))
                               forms))))
                   clauses)))))
 
@@ -318,29 +318,29 @@ (defmacro with-places ((&key environment) places &body body)
   (if (null places)
       `(progn ,@body)
       (let*/gensyms (environment)
-        (labels
-            ((more (places)
-               (let ((place (car places)))
-                 (with-gensyms (tmp valtmps valforms
-                                    newtmps setform getform)
-                   `((let ((,tmp ,(cadr place))
-                           (,(car place)
-                            (gensym ,(symbol-name (car place)))))
-                       (multiple-value-bind
-                           (,valtmps ,valforms
-                            ,newtmps ,setform ,getform)
-                           (get-setf-expansion ,tmp
-                                               ,environment)
-                         (list 'let*
-                               (mapcar #'list ,valtmps ,valforms)
-                               `(symbol-macrolet ((,,(car place)
-                                                   (%place-ref ,,getform
-                                                               ,,setform
-                                                               ,,newtmps)))
-                                  ,,@(if (cdr places)
-                                         (more (cdr places))
-                                         body))))))))))
-          (car (more (mapcar #'pairify (listify places))))))))
+       (labels
+           ((more (places)
+              (let ((place (car places)))
+                (with-gensyms (tmp valtmps valforms
+                                   newtmps setform getform)
+                  `((let ((,tmp ,(cadr place))
+                          (,(car place)
+                           (gensym ,(symbol-name (car place)))))
+                      (multiple-value-bind
+                          (,valtmps ,valforms
+                           ,newtmps ,setform ,getform)
+                          (get-setf-expansion ,tmp
+                                              ,environment)
+                        (list 'let*
+                              (mapcar #'list ,valtmps ,valforms)
+                              `(symbol-macrolet ((,,(car place)
+                                                  (%place-ref ,,getform
+                                                              ,,setform
+                                                              ,,newtmps)))
+                                 ,,@(if (cdr places)
+                                        (more (cdr places))
+                                        body))))))))))
+         (car (more (mapcar #'pairify (listify places))))))))
 
 ;;;--------------------------------------------------------------------------
 ;;; Update-in-place macros built using with-places.
@@ -385,7 +385,7 @@ (defmacro locf (place &environment env)
       (get-setf-expansion place env)
     `(let* (,@(mapcar #'list valtmps valforms))
        (make-loc (lambda () ,getform)
-                 (lambda (,@newtmps) ,setform)))))
+                (lambda (,@newtmps) ,setform)))))
 
 (declaim (inline loc (setf loc)))
 
index 7af8ad98155590dd35bbbca6e9d759e083dbf8f0..e744fcdfd3bb39da9dad4be714fbd13bdd1892cb 100644 (file)
@@ -368,27 +368,27 @@ (defclass singleton-class (mdw-class singleton-class-mixin) ())
 (defun print-object-with-slots (obj stream)
   "Prints objects in a pleasant way.  Not too clever about circularity."
   (let ((class (class-of obj))
-        (magic (cons 'magic nil)))
+       (magic (cons 'magic nil)))
     (print-unreadable-object (obj stream)
       (pprint-logical-block
-          (stream
-           (mapcan (lambda (slot)
-                     (list (or (car (slot-definition-initargs slot))
-                               (slot-definition-name slot))
-                           (if (slot-boundp-using-class class obj slot)
-                               (slot-value-using-class class obj slot)
-                               magic)))
-                   (class-slots class)))
-        (format stream "~S" (class-name class))
-        (let ((sep nil))
-          (loop
-            (pprint-exit-if-list-exhausted)
-            (if sep
-                (format stream " ~_")
-                (progn (format stream " ~@_~:I") (setf sep t)))
-            (let ((name (pprint-pop))
-                  (value (pprint-pop)))
-              (format stream "~S ~@_~:[~W~;#<unbound>~*~]"
-                      name (eq value magic) value))))))))
+         (stream
+          (mapcan (lambda (slot)
+                    (list (or (car (slot-definition-initargs slot))
+                              (slot-definition-name slot))
+                          (if (slot-boundp-using-class class obj slot)
+                              (slot-value-using-class class obj slot)
+                              magic)))
+                  (class-slots class)))
+       (format stream "~S" (class-name class))
+       (let ((sep nil))
+         (loop
+           (pprint-exit-if-list-exhausted)
+           (if sep
+               (format stream " ~_")
+               (progn (format stream " ~@_~:I") (setf sep t)))
+           (let ((name (pprint-pop))
+                 (value (pprint-pop)))
+             (format stream "~S ~@_~:[~W~;#<unbound>~*~]"
+                     name (eq value magic) value))))))))
 
 ;;;----- That's all, folks --------------------------------------------------
index 09050f631b0abd558223f490b01887668db1609f..73d961932952c00be22783e30cb2040858027d16 100644 (file)
@@ -426,8 +426,8 @@ (defmacro with-unix-error-reporting ((&key) &body body)
         (progn ,@body)
        (simple-condition (,cond)
         (apply #'die
-               (simple-condition-format-control ,cond)
-               (simple-condition-format-arguments ,cond)))
+               (simple-condition-format-control ,cond)
+               (simple-condition-format-arguments ,cond)))
        (error (,cond)
         (die "~A" ,cond)))))
 
index 5cf05aa7deea73e40f794fd6d02c79f426e05bed..a943bae632af21b9047ac99f3cbd8d7598052b22 100644 (file)
--- a/str.lisp
+++ b/str.lisp
@@ -37,7 +37,7 @@ (defun join-strings (del strs)
   (with-output-to-string (s)
     (when strs
       (loop
-        (princ (stringify (pop strs)) s)
+       (princ (stringify (pop strs)) s)
        (unless strs
          (return))
        (princ del s)))))
index 370e80e94216cb0b92698fd7b3da4a4e61e9769e..bef7ce9f782a769821b17f88e6b98b64e41e2986 100644 (file)
@@ -53,7 +53,7 @@ (defun set-command-line-arguments ()
            #+sbcl sb-ext:*posix-argv*
            #+ecl (loop from i below (ext:argc) collect (ext:argv i))
            #+clisp (loop with argv = (ext:argv)
-                         for i from 7 below (length argv)
+                         for i from 7 below (length argv)
                          collect (aref argv i))
            '("<unknown-lisp>" "--" "<unknown-script>")))
   (setf *program-name* (pathname-name (car *command-line*))))
index f82fbf1f25fd73b5aa9d4a0c6d0ab5310be3b773..be823f0b3bbb6d39943b2bc2ecbb2e96afdf4a19 100644 (file)
--- a/unix.lisp
+++ b/unix.lisp
@@ -130,8 +130,8 @@ (macrolet ((doit (doc slots)
             `(defstruct (stat (:predicate statp)
                               (:conc-name st-)
                               (:constructor %make-stat-boa ,slots))
-               ,doc
-               ,@slots)))
+               ,doc
+               ,@slots)))
   (doit
    "Structure representing all the useful information `stat' returns about a
    file."
@@ -184,7 +184,7 @@ (defun copy-file (from to &optional (how 0))
                       to
                       (logior unix:O_WRONLY unix:O_CREAT how)
                       (logand (st-mode st) #o777))
-        (sys-fchmod out (st-mode st))
+       (sys-fchmod out (st-mode st))
        (sys-utimes to (st-atime st) 0 (st-mtime st) 0)
        (with-errno-handlers ()
          (sys-fchown out (st-uid st) (st-gid st))