Source

ilisp / cmulisp.lisp

Diff from to

File cmulisp.lisp

 ;;; $Id$
 
 
-(in-package "ILISP")
+(in-package :ilisp)
 
 ;;;% CMU CL does not define defun as a macro
 (defun ilisp-compile (form package filename)
 			(member-if
 			 #'(lambda (restart)
 			     (string=
-			      (funcall
-			       (conditions::restart-report-function restart)
-			       nil)
+                              (with-output-to-string (s)
+			        (funcall
+			         (conditions::restart-report-function restart)
+			         s))
 			      "Return to " :end1 10))
 			 restart-list)))
 		   (cond ((zerop num) (car first))
 	    (values (symbol-function sym) :function)
 	    (values nil nil)))))
 
-(export '(arglist source-file cmulisp-trace))
-
 ;;;%% arglist - return arglist of function
 ;;;
 ;;; This function is patterned after DESCRIBE-FUNCTION in the
 		 #.vm:closure-function-header-type)
 		(massage-arglist
                  (the-function-if-defined
-                  (#:%function-arglist :lisp #:%function-header-arglist :lisp)
+                  ((#:%function-arglist :lisp) (#:%function-header-arglist :lisp))
                   func)))
 	       (#.vm:funcallable-instance-header-type
 		(typecase func
        ;; In this case we fall back on the TAGS machinery.
        ;; (At least as I underestand the code).
        ;; Marco Antoniotti 11/22/94.
-       (cond ((or (the-function-if-defined (#:generic-function-p :pcl) fun)
-                  (the-function-if-defined (#:get-type :lisp)
+       (cond ((or (the-function-if-defined ((#:generic-function-p :pcl) ())
+                                           fun)
+                  (the-function-if-defined ((#:get-type :lisp) ()
+                                            :function-binding-p t)
                                            (= (funcall the-function fun)
                                               #.vm:funcallable-instance-header-type)))
                (dolist (method (pcl::generic-function-methods fun))
                  (print-simple-source-info
-                  (the-function-if-defined
-                   (#:method-fast-function :pcl #:method-function :pcl)
-                   method)))
+                  (the-function-if-defined ((#:method-fast-function :pcl)
+                                            (#:method-function :pcl))
+                                           method)))
                t)
              (t (print-simple-source-info fun)))))))
 
 function was defined in.  If it was not defined in some file, nil is
 returned."
   (flet ((frob (code)
-	       (let ((info (the-function-if-defined
-                            (#:%code-debug-info :kernel #:code-debug-info :kernel)
-                            code)))
+	       (let ((info (the-function-if-defined ((#:%code-debug-info
+                                                      :kernel)
+                                                     (#:code-debug-info
+                                                      :kernel))
+                                                    code)))
 		 (when info
 		       (let ((sources (c::debug-info-source info)))
 			 (when sources
 				       (c::debug-source-name source)))))))))
 	(typecase function
 		  (symbol (fun-defined-from-pathname (fdefinition function)))
-                  (#.(the-symbol-if-defined (#:byte-closure :kernel))
-                   (fun-defined-from-pathname
-                    (kernel:byte-closure-function function)))		  
-		  (#.(the-symbol-if-defined (#:byte-function :kernel))
-		   (frob (c::byte-function-component function)))
+                  (#.(the-symbol-if-defined ((#:byte-closure :kernel) ()))
+                    (fun-defined-from-pathname
+                     (kernel:byte-closure-function function)))
+		  (#.(the-symbol-if-defined ((#:byte-function :kernel) ()))
+                    (frob (c::byte-function-component function)))
 		  (function
 		   (frob (kernel:function-code-header
 			  (kernel:%function-self function))))