|
From: <Mic...@HV...> - 2004-01-05 15:38:53
|
Hi there,
I'm using ILISP with LispWorks 4.3, and I've run into a number of problems.
Please excuse my not sending proper patches---the tools necessary for this
are not available in my (very restricted) working environment. (Outlook
will likely also have mangled the source code---sorry about that.)
First of all, there's some magic specific to LW 4.1 and 4.2 in
lispworks.lisp
which I've rewritten ot not refer to the LispWorks version directly:
(defun ilisp-find-function (name package)
(multiple-value-bind (symbol status)
(intern name package)
(and (eq status :external)
symbol)))
(defun ilisp-callers (symbol package)
"Print a list of all of the functions that call FUNCTION.
Returns T if successful."
(ilisp-errors
(let ((function-name (ilisp-find-symbol symbol package))
(*print-level* nil)
(*print-length* nil)
(*package* (find-package 'lisp))
(callers ())
)
(when (and function-name (fboundp function-name))
(setf callers (munge-who-calls
(cond
((ilisp-find-function "WHO-CALLS" 'lw)
(funcall (ilisp-find-function "WHO-CALLS" 'lw)
function-name))
((ilisp-find-function "WHO-CALLS" 'hcl)
(funcall (ilisp-find-function "WHO-CALLS" 'hcl)
function-name)))))
(dolist (caller callers)
(print caller))
t))))
Next, the code for sys:get-top-loop-handler etc. doesn't work anymore in
4.3---
specifically, sys::line is no longer available. Accordingly, the settings
for `ilisp-save-command' and `ilisp-restore-command' in ilisp-hlw.el are
obsolete.
On Windows, ILISP also fails to quote filenames correctly. I've put the
following kludge
into ilisp-snd.el:
(defun ilisp-quote-filename (file)
"Quote backslashes in FILE."
(replace-in-string file "\\\\" "\\\\\\\\"))
(defun ilisp-load-or-send (file)
"Try to load FILE into the inferior LISP.
If the file is not accessible in the inferior LISP as determined by
ilisp-load-or-send-command, then visit the file and send the file over
the process interface."
(let* ((command
(format (ilisp-value 'ilisp-load-or-send-command)
(ilisp-quote-filename
(lisp-file-extension
file
(ilisp-value 'ilisp-init-binary-extension t)))
file)))
(insert-string (format ilisp-block-command string)
(process-buffer (ilisp-process)))
...
With this in place, I can at least eval stuff like (+ 1 2). I'll see if
more develops.
Please direct feedback to sp...@in...---I'm not on
ilisp-devel.
Cheers,
Mike
|