~mdw
/
lisp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
infix: Remove redundant progn in loop expander
[lisp]
/
mdw-base.lisp
diff --git
a/mdw-base.lisp
b/mdw-base.lisp
index
59ea692
..
37a3068
100644
(file)
--- a/
mdw-base.lisp
+++ b/
mdw-base.lisp
@@
-53,11
+53,17
@@
(defun ,name ,args ,@body)))
(defmacro show (x)
(defun ,name ,args ,@body)))
(defmacro show (x)
- "Debugging tool: print the expression X and its value."
+ "Debugging tool: print the expression X and its value
s
."
(let ((tmp (gensym)))
(let ((tmp (gensym)))
- `(let ((,tmp ,x))
- (format t "~&~S: ~S~%" ',x ,tmp)
- ,tmp)))
+ `(let ((,tmp (multiple-value-list ,x)))
+ (format t "~&")
+ (pprint-logical-block (*standard-output* nil :per-line-prefix ";; ")
+ (format t
+ "~S = ~@_~:I~:[#<no values>~;~:*~{~S~^ ~_~}~]"
+ ',x
+ ,tmp))
+ (terpri)
+ (values-list ,tmp))))
(defun stringify (str)
"Return a string representation of STR. Strings are returned unchanged;
(defun stringify (str)
"Return a string representation of STR. Strings are returned unchanged;