[Git][cmucl/cmucl][master] 2 commits: Fix #47: Print backquote multiple splices correctly

Raymond Toy rtoy at common-lisp.net
Tue Jan 30 03:04:31 UTC 2018


Raymond Toy pushed to branch master at cmucl / cmucl


Commits:
dc4a7e00 by Raymond Toy at 2018-01-28T18:20:20-08:00
Fix #47: Print backquote multiple splices correctly

* Print multiple splices correclty without the extra set of
  parenthesis around each splice.
* Add test for this.

- - - - -
e7f97a5d by Raymond Toy at 2018-01-30T03:04:30+00:00
Merge branch 'rtoy-fix-47-backq-splice-printer' into 'master'

Fix #47: Print backquote multiple splices correctly

Closes #47

See merge request cmucl/cmucl!33
- - - - -


2 changed files:

- src/code/backq.lisp
- tests/issues.lisp


Changes:

=====================================
src/code/backq.lisp
=====================================
--- a/src/code/backq.lisp
+++ b/src/code/backq.lisp
@@ -263,7 +263,8 @@
 		   (backq-unparse (car tail) t)))
 	 (push (backq-unparse (car tail)) accum)))
       (backq-append
-       (mapcar #'(lambda (el) (backq-unparse el t))
+       (mapcar #'(lambda (el)
+		   (car (backq-unparse el t)))
 	       (cdr form)))
       (backq-nconc
        (mapcar #'(lambda (el) (backq-unparse el :nconc))


=====================================
tests/issues.lisp
=====================================
--- a/tests/issues.lisp
+++ b/tests/issues.lisp
@@ -434,4 +434,12 @@
 			    "./"
 			    test-dir-name
 			    "ls-link")))))
-					       
+
+(define-test issue.47
+  (:tag :issues)
+  (with-standard-io-syntax
+    (assert-equal "`(, at VARS , at VARS)"
+		  (with-output-to-string (s)
+		    (write (read-from-string "`(, at vars , at vars)")
+			   :pretty t
+			   :stream s)))))



View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/compare/380759e3d91a1d6517a2025452df594a47e25a68...e7f97a5d5e72b65650ecfc2883cf5bff4ae9a250

---
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/compare/380759e3d91a1d6517a2025452df594a47e25a68...e7f97a5d5e72b65650ecfc2883cf5bff4ae9a250
You're receiving this email because of your account on gitlab.common-lisp.net.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20180130/9eea1806/attachment-0001.html>


More information about the cmucl-cvs mailing list