1 ;;; -*- Mode: Lisp; tab-width: 4 -*-
4 ;;; This file is part of ILISP.
5 ;;; Version: 5.8 - 5.10
7 ;;; Copyright (C) 1990, 1991, 1992, 1993 Chris McConnell
8 ;;; 1993, 1994 Ivan Vasquez
9 ;;; 1994, 1995, 1996 Marco Antoniotti and Rick Busdiecker
10 ;;; 1996 Marco Antoniotti and Rick Campbell
13 ;;; Other authors' names for which this Copyright notice also holds
14 ;;; may appear later in this file.
16 ;;; ILISP is freely redistributable under the terms found in the file
20 ;;; Cormanlisp initializations
21 ;;; Author: Reini Urban <rurban@x-ray.at>
25 (defun ilisp-source-files (symbol package type)
26 "Print each file for PACKAGE:SYMBOL's TYPE definition on a line and
27 return T if successful."
28 (declare (ignore type))
30 (let* ((symbol (ilisp-find-symbol symbol package))
32 ;;(type (if (equal type "any") t (ilisp-find-symbol type "keyword")))
33 (paths (when symbol (debug::function-source-file symbol))))
37 (dolist (path (remove-duplicates paths
38 :key #'cdr :test #'equal))
39 (print (namestring (cdr path))))
40 (print (namestring paths)))
44 (export '(ilisp-source-files))
46 ;;; ILISP Patches for cormanlisp <= 2.0
48 (in-package :common-lisp)
50 (defun inspect (symbol)
53 ;; not really needed with my cl-ilisp.lisp patch, but for legacy sake
54 (defun special-form-p (symbol)
55 (special-operator-p symbol))
57 (unless (fboundp 'compile-file-pathname)
59 (defvar fasl-file-extension ".fasl")
61 ;;; Common Lisp COMPILE-FILE-PATHNAME function.
63 ;;; CLtL2: "If an implementation supports additional keyword arguments to
64 ;;; compile-file, compile-file-pathname must accept the same arguments."
66 (defun compile-file-pathname (input-file &key
68 (verbose *compile-verbose*)
69 (print *compile-print*)
70 (external-format :default))
71 (create-pathname-from-string
72 (compile-file-name (namestring (pathname input-file))
73 :output-file output-file
76 :external-format external-format)))
78 (defun compile-file-name (input-file &key
80 (verbose *compile-verbose*)
81 (print *compile-print*)
82 (external-format :default))
83 "Returns the compiled filename string for the input-file string"
84 (declare (ignore verbose external-format print))
85 (if (null output-file)
88 (- (length input-file)(length lisp-file-extension))
94 (- (length input-file)
95 (length lisp-file-extension)))
97 (concatenate 'string input-file fasl-file-extension))
98 (namestring (pathname output-file))))
100 ) ; eof compile-file-pathname patch
102 (unless (fboundp 'readtable-case)
105 ;;; Common Lisp READTABLE-CASE accessor
107 ;;; Note: at booting check-type,warn,defun setf are not defined
109 (defun readtable-case (readtbl)
110 (if (macro-function 'check-type) ; booting
111 (check-type readtbl readtable)
113 (if (not (readtablep readtbl))
114 (error "Argument is no valid readtable: ~A" readtbl)))
115 (uref readtbl readtable-case-offset))
117 (defun set-readtable-case (readtbl value)
118 "For compatibility only. All values except :UPCASE are ignored."
119 (let ((valid-case '(:upcase))
120 (ignored-case '(:downcase :preserve :invert)))
121 (if (macro-function 'check-type) ; booting
123 (check-type readtbl readtable)
124 (check-type value symbol)))
126 ((member value valid-case)
127 (setf (uref readtbl readtable-case-offset) value))
128 ((member value ignored-case)
129 (error "SET-READTABLE-CASE: only :UPCASE supported: ~A"
132 (error "Argument is no valid readtable-case: ~A, expected ~A"
133 value valid-case)))))
136 (set-readtable-case *readtable* ':upcase)
137 (set-readtable-case *common-lisp-readtable* ':upcase)
139 (defsetf readtable-case set-readtable-case)
141 ) ; eof readtable-case patch