Recently Written · git

common-lisp-utils

My utilities for Common Lisp programming.

git clone https://github.com/equwal/common-lisp-utils

Log | Files | Refs


commit 6b2635eb9322ddd78d3d1c89ac0679f227c9242e
jose <jose@linux-q5ep.lan>
2018-11-17 18:56:52 -0800

No trace.

 macrog.lisp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/macrog.lisp b/macrog.lisp
index 333c85f..4db1d41 100644
--- a/macrog.lisp
+++ b/macrog.lisp
@@ -32,15 +32,15 @@
        (concatenate 'string (subseq acc 0 (1- (length acc))))))
 (defun gbang (stream no nope)
   (declare (ignore no nope))
-  (let* ((str (let ((seq (read-to-string stream)))
-		(prepare (subseq seq (+ 2 (search "!" seq))))))
-	 (code (princ (read-from-string str nil)))
+  (let* ((str1 (read-to-string stream))
+	 (term (aref str1 0))
+	 (str (prepare str1))
+	 (code (read-from-string str nil))
 	 (syms (remove-duplicates (mapcar #'(lambda (x) (intern (remove #\, (symbol-name x))))
 					  (remove-if-not #'g!-symbol-p (read-atoms str)))
 				  :test #'(lambda (x y)
 					    (string-equal (symbol-name x)
 							  (symbol-name y))))))
-    (princ syms)
     ;; a good thing.
     `(defmacro ,(car code) ,(cadr code)
        (let (,@(loop for x in syms
@@ -54,7 +54,7 @@
 ;; Dirty test case
 ;; #defmacro/g! name (z) `(let ((,g!y ,z)) (list ,g!y ,g!y)))
 ;; Clean test case
-;(defmacro/g! name (z) `(let ((,g!y ,z)) (list ,g!y ,g!y)))
+;#d{name (z) `(let ((,g!y ,z)) (list ,g!y ,g!y))}
 (set-dispatch-macro-character #\# #\d #'gbang)
 ;(set-macro-character #\d #'g! t)
 ;; (defmacro defmacro/g! (name args &rest body)