chiark
/
gitweb
/
~mdw
/
lisp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mop: Use CMUCL's `mop' package instead of `pcl'.
[lisp]
/
mdw-base.lisp
diff --git
a/mdw-base.lisp
b/mdw-base.lisp
index 59ea6923c65b086de015750cc134e51e6ab4101b..37a30684330953cea4daaa00702f2fb116be4e32 100644
(file)
--- a/
mdw-base.lisp
+++ b/
mdw-base.lisp
@@
-53,11
+53,17
@@
(defmacro compile-time-defun (name args &body body)
(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;