From c6a7bd9c9a21b4f205eb559fc10395d3665fa7c1 Mon Sep 17 00:00:00 2001 From: dtc <dtc> Date: Sun, 2 Apr 2000 20:25:32 +0000 Subject: [PATCH] o Handle the inspection of general CONS objects. These had been giving an error when checking for the list length; and more work is needed to handle improper lists. --- code/tty-inspect.lisp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/code/tty-inspect.lisp b/code/tty-inspect.lisp index 9afeb71ce..8aa6d143d 100644 --- a/code/tty-inspect.lisp +++ b/code/tty-inspect.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/tty-inspect.lisp,v 1.16 1998/03/26 13:12:31 pw Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/tty-inspect.lisp,v 1.17 2000/04/02 20:25:32 dtc Exp $") ;;; ;;; ********************************************************************** ;;; @@ -199,9 +199,13 @@ (coerce object 'list))) (defun describe-cons-parts (object) - (list* (format nil "Object is a LIST of length ~d.~%" (length object)) - nil - object)) + (if (listp (cdr object)) + (list* (format nil "Object is a LIST of length ~d.~%" (length object)) + nil + object) + (list (format nil "Object is a CONS.~%") t + (cons "Car" (car object)) + (cons "Cdr" (cdr object))))) ;;; ### Copied from inspect.lisp. Remove when it is up. ;;; -- GitLab