Initial Commit
[packages] / xemacs-packages / ilisp / cl-chs-init.lisp
1 ;;; -*- Mode: Lisp -*-
2
3 ;;; cl-chs-init.lisp --
4 ;;; Init file for CLisp H.S.
5 ;;;
6 ;;; This file is part of ILISP.
7 ;;; Please refer to the file COPYING for copyrights and licensing
8 ;;; information.
9 ;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
10 ;;; of present and past contributors.
11 ;;;
12 ;;; $Id: cl-chs-init.lisp,v 1.3 2002-05-30 13:59:20 wbd Exp $
13
14 ;;; Old history logs.
15 ;;;
16 ;;; 19990912 Marco Antoniotti
17 ;;; Cleaned up for inclusion in 5.9.1.  See also file 'cl-ilisp.lisp'
18 ;;; for related changes (e.g. in ILISP-ERRORS).
19 ;;;
20 ;;; 1999-09-03; M. Atzmueller
21 ;;; removed obsolete stuff
22 ;;;
23 ;;; 1999-06-15: M. Atzmueller
24 ;;; removed command to load inspect1.fas
25 ;;; load any INSPECTOR yourself if there is no other inspect!
26 ;;; 
27 ;;; 1999-05-31: M. Atzmueller
28 ;;; ilisp-arglist => #+clisp arglist (...) modified definition
29 ;;; another option might be sys::arglist ...
30 ;;; added command to preload inspect1
31
32 (in-package :ilisp)
33
34 ;;;
35 (defun ilisp-inspect (sexp package)
36   "Inspect SEXP in PACKAGE."
37   (when (not (ignore-errors (functionp #'inspect)))
38     (cerror
39      "~% Try loading it yourself, or proceed without inspecting ... :-( !" 
40      "~% There seems to be no INSPECTOR present!"))
41
42   (ilisp-errors
43    (let ((*package* (ilisp-find-package package)))
44      (if (functionp #'inspect)
45          (let ((item-to-be-described (read-from-string sexp)))
46            (if (atom item-to-be-described)
47                (inspect item-to-be-described)
48              (inspect (eval item-to-be-described))))
49        (format t "Sorry -- can't inspect ~S as Clisp has no inspector!"
50                      sexp)))))
51
52 (defun arglist (sym)
53   (when (fboundp sym)
54     (let* ((s (with-output-to-string (s) (describe (symbol-function sym) s)))
55            (p (search "Argument list: " s)))
56       (if p
57           (read-from-string (subseq s (+ 15 (search "Argument list: " s))))
58         '(???)))))
59
60 ;;; Epilogue
61
62 (eval-when (:execute :load-toplevel)
63   (when (not (compiled-function-p #'ilisp-inspect))
64     (ilisp-message t "File is not compiled, use M-x ilisp-compile-inits"))
65
66   (when (boundp 'system::*source-file-types*)
67     (pushnew (pathname ".lisp") system::*source-file-types* :test #'equalp))
68   (sys::debug-unwind))
69
70
71 ;;; end of file -- cl-chs-init.lsp --