From: Olof-Joachim Frahm Date: Tue, 21 May 2013 19:05:36 +0000 (+0200) Subject: Make FORMATS Go-To available. X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=e47b48d551a9cd62b9c80e8c93057f53295b3283;p=jscl.git Make FORMATS Go-To available. I.e. skip single argument for now. --- diff --git a/src/print.lisp b/src/print.lisp index 4f29c46..f5360bc 100644 --- a/src/print.lisp +++ b/src/print.lisp @@ -267,6 +267,8 @@ (concatf res "~")) ((char= next #\%) (concatf res *newline*)) + ((char= next #\*) + (pop arguments)) (t (concatf res (format-special next (car arguments))) (pop arguments)))) diff --git a/tests/format.lisp b/tests/format.lisp index 3491010..ad61954 100644 --- a/tests/format.lisp +++ b/tests/format.lisp @@ -10,3 +10,5 @@ a" (format nil "a~%a"))) (test (string= "this is foo" (format nil "this is ~a" "foo"))) (test (string= "this is \"foo\"" (format nil "this is ~S" "foo"))) + +(test (string= "this is 2" (format nil "this is ~*~A" 1 2)))