[slime-cvs] CVS update: slime/swank.lisp
Helmut Eller
heller at common-lisp.net
Thu Nov 13 00:22:03 UTC 2003
Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv11932
Modified Files:
swank.lisp
Log Message:
(swank-pprint): New function.
Date: Wed Nov 12 19:22:03 2003
Author: heller
Index: slime/swank.lisp
diff -u slime/swank.lisp:1.56 slime/swank.lisp:1.57
--- slime/swank.lisp:1.56 Sat Nov 8 11:59:38 2003
+++ slime/swank.lisp Wed Nov 12 19:22:01 2003
@@ -246,15 +246,18 @@
(makunbound name)
(prin1-to-string (eval form))))))
+(defun swank-pprint (object)
+ "Bind some printer variables and pretty print OBJECT to a string."
+ (let ((*print-pretty* t)
+ (*print-circle* t)
+ (*print-level* nil)
+ (*print-length* nil))
+ (with-output-to-string (stream)
+ (pprint object stream))))
+
(defslimefun pprint-eval (string)
(let ((*package* *buffer-package*))
- (let ((value (eval (read-from-string string))))
- (let ((*print-pretty* t)
- (*print-circle* t)
- (*print-level* nil)
- (*print-length* nil))
- (with-output-to-string (stream)
- (pprint value stream))))))
+ (swank-pprint (eval (read-from-string string)))))
(defslimefun set-package (package)
(setq *package* (guess-package-from-string package))
More information about the slime-cvs
mailing list