ilisp / cl-chs-init.lisp

;;; cl-chs-init.lisp --
;;; Init file for CLisp H.S.
;;;
;;; 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 --
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.