[slime-cvs] CVS slime
CVS User heller
heller at common-lisp.net
Sun Nov 7 19:48:21 UTC 2010
Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv10815
Modified Files:
ChangeLog swank-backend.lisp
Log Message:
* swank-backend.lisp (label-value-line): Remove display-nil-value.
And the other stuff too.
(label-value-line*): Idem.
--- /project/slime/cvsroot/slime/ChangeLog 2010/11/07 19:48:14 1.2162
+++ /project/slime/cvsroot/slime/ChangeLog 2010/11/07 19:48:21 1.2163
@@ -1,5 +1,11 @@
2010-11-07 Helmut Eller <heller at common-lisp.net>
+ * swank-backend.lisp (label-value-line): Remove display-nil-value.
+ And the other stuff too.
+ (label-value-line*): Idem.
+
+2010-11-07 Helmut Eller <heller at common-lisp.net>
+
* swank-loader.lisp: ASDF free again. And proud of it!
(default-fasl-dir, load-swank): Remove asdf stuff.
--- /project/slime/cvsroot/slime/swank-backend.lisp 2010/10/15 22:42:14 1.204
+++ /project/slime/cvsroot/slime/swank-backend.lisp 2010/11/07 19:48:21 1.205
@@ -1053,45 +1053,16 @@
;;; Utilities for inspector methods.
;;;
-(defun label-value-line (label value &key padding-length display-nil-value hide-when-nil
- splice-as-ispec value-text (newline t))
- "Create a control list which prints \"LABEL: VALUE\" in the inspector."
- (if (or value (not hide-when-nil))
- `((:label ,(princ-to-string label) ":")
- ,@(when (or value display-nil-value)
- (list " "))
- ,@(when (and (or value display-nil-value)
- padding-length)
- (list (make-array padding-length
- :element-type 'character
- :initial-element #\Space)))
- ,@(when (or value display-nil-value)
- (if splice-as-ispec
- (if (listp value) value (list value))
- `((:value ,value ,@(when value-text (list value-text))))))
- ,@(if newline '((:newline)) nil))
- (values)))
+
+(defun label-value-line (label value &key (newline t))
+ "Create a control list which prints \"LABEL: VALUE\" in the inspector.
+If NEWLINE is non-NIL a `(:newline)' is added to the result."
+ (list* (princ-to-string label) ": " `(:value ,value)
+ (if newline '((:newline)) nil)))
(defmacro label-value-line* (&rest label-values)
- (let ((longest-label-length (loop
- :for (label value) :in label-values
- :maximize (if (stringp label)
- (length label)
- 0))))
- `(append ,@(loop
- :for entry :in label-values
- :if (and (consp entry)
- (not (consp (first entry)))
- (string= (first entry) '@))
- :appending (rest entry)
- :else
- :collect (destructuring-bind
- (label value &rest args &key &allow-other-keys) entry
- `(label-value-line ,label ,value
- :padding-length ,(when (stringp label)
- (- longest-label-length
- (length label)))
- , at args))))))
+ ` (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