Use pop and concatf in basic format
authorDavid Vázquez <davazp@gmail.com>
Thu, 2 May 2013 23:00:19 +0000 (00:00 +0100)
committerDavid Vázquez <davazp@gmail.com>
Thu, 2 May 2013 23:00:19 +0000 (00:00 +0100)
src/print.lisp

index 79a5359..f0752e9 100644 (file)
            (let ((next (char fmt (incf i))))
              (cond
               ((char= next #\~)
-               (setq res (concat res "~")))
+               (concatf res "~"))
               ((char= next #\%)
-               (setq res (concat res *newline*)))
+               (concatf res *newline*))
               (t
-               (setq res (concat res (format-special next (car arguments))))
-               (setq arguments (cdr arguments)))))
+               (concatf res (format-special next (car arguments)))
+               (pop arguments))))
          (setq res (concat res (char-to-string c))))
        (incf i)))
     (if destination