[slime-cvs] CVS update: slime/swank-backend.lisp

Helmut Eller heller at common-lisp.net
Thu Sep 23 21:19:52 UTC 2004


Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv30306

Modified Files:
	swank-backend.lisp 
Log Message:
(frame-package, label-value-line, label-value-line*): New functions.


Date: Thu Sep 23 23:19:52 2004
Author: heller

Index: slime/swank-backend.lisp
diff -u slime/swank-backend.lisp:1.69 slime/swank-backend.lisp:1.70
--- slime/swank-backend.lisp:1.69	Sun Sep 19 07:52:48 2004
+++ slime/swank-backend.lisp	Thu Sep 23 23:19:52 2004
@@ -32,6 +32,8 @@
            #:inspect-for-emacs
            #:raw-inspection
            #:fancy-inspection
+           #:label-value-line
+           #:label-value-line*
            ))
 
 (defpackage :swank-mop
@@ -438,6 +440,11 @@
 (definterface print-frame (frame stream)
   "Print frame to stream.")
 
+(definterface frame-package (frame)
+  "Return the preferred package to use when printing local variables.
+NIL can be used if no particular package is known."
+  nil)
+
 (definterface frame-source-location-for-emacs (frame-number)
   "Return the source location for FRAME-NUMBER.")
 
@@ -683,6 +690,16 @@
             (:newline) (:newline)
             ,(with-output-to-string (desc)
                (describe object desc)))))
+
+;;; Utilities to for inspector methods.
+;;; 
+(defun label-value-line (label value)
+  "Create a control list which prints \"LABEL: VALUE\" in the inspector."
+  (list (princ-to-string label) ": " `(:value ,value) '(:newline)))
+
+(defmacro label-value-line* (&rest label-values)
+  ` (append ,@(loop for (label value) in label-values
+                    collect `(label-value-line ,label ,value))))
 
 (definterface describe-primitive-type (object)
   "Return a string describing the primitive type of object."





More information about the slime-cvs mailing list