File: cl-chs-init.lisp

package info (click to toggle)
xemacs21-packages 2009.02.17.dfsg.1-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 116,928 kB
  • ctags: 88,975
  • sloc: lisp: 1,232,060; ansic: 16,570; java: 13,514; xml: 6,477; sh: 4,611; makefile: 4,036; asm: 3,007; perl: 839; cpp: 500; ruby: 257; csh: 96; haskell: 93; awk: 49; python: 47
file content (71 lines) | stat: -rw-r--r-- 2,192 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
;;; -*- Mode: Lisp -*-

;;; cl-chs-init.lisp --
;;; Init file for CLisp H.S.
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: cl-chs-init.lisp,v 1.3 2002-05-30 13:59:20 wbd Exp $

;;; Old history logs.
;;;
;;; 19990912 Marco Antoniotti
;;; Cleaned up for inclusion in 5.9.1.  See also file 'cl-ilisp.lisp'
;;; for related changes (e.g. in ILISP-ERRORS).
;;;
;;; 1999-09-03; M. Atzmueller
;;; removed obsolete stuff
;;;
;;; 1999-06-15: M. Atzmueller
;;; removed command to load inspect1.fas
;;; load any INSPECTOR yourself if there is no other inspect!
;;; 
;;; 1999-05-31: M. Atzmueller
;;; ilisp-arglist => #+clisp arglist (...) modified definition
;;; another option might be sys::arglist ...
;;; added command to preload inspect1

(in-package :ilisp)

;;;
(defun ilisp-inspect (sexp package)
  "Inspect SEXP in PACKAGE."
  (when (not (ignore-errors (functionp #'inspect)))
    (cerror
     "~% Try loading it yourself, or proceed without inspecting ... :-( !" 
     "~% There seems to be no INSPECTOR present!"))

  (ilisp-errors
   (let ((*package* (ilisp-find-package package)))
     (if (functionp #'inspect)
	 (let ((item-to-be-described (read-from-string sexp)))
	   (if (atom item-to-be-described)
	       (inspect item-to-be-described)
	     (inspect (eval item-to-be-described))))
       (format t "Sorry -- can't inspect ~S as Clisp has no inspector!"
		     sexp)))))

(defun arglist (sym)
  (when (fboundp sym)
    (let* ((s (with-output-to-string (s) (describe (symbol-function sym) s)))
	   (p (search "Argument list: " s)))
      (if p
	  (read-from-string (subseq s (+ 15 (search "Argument list: " s))))
	'(???)))))

;;; Epilogue

(eval-when (:execute :load-toplevel)
  (when (not (compiled-function-p #'ilisp-inspect))
    (ilisp-message t "File is not compiled, use M-x ilisp-compile-inits"))

  (when (boundp 'system::*source-file-types*)
    (pushnew (pathname ".lisp") system::*source-file-types* :test #'equalp))
  (sys::debug-unwind))


;;; end of file -- cl-chs-init.lsp --