|
From: Lynn Q. <qu...@AI...> - 2003-12-18 17:43:10
|
Changing (setq lisp-edit-file nil) to (setq lisp-edit-files nil)
fixed some problems, but I have isolated another problem related
to setf methods. Here is a test file:
File: /tmp/ilisp-test.lisp
#########################################
(in-package :cl-user)
(defclass foo ()
((x :initform 'x)))
(defmethod bar ((obj foo))
nil)
(defmethod (setf bar) (value (obj foo))
nil)
(defun foo (x)
nil)
(defun (setf foo) (value x)
nil)
#|
(load (compile-file "/tmp/ilisp-test.lisp"))
(bar x)
(foo x)
|#
#########################################
Again, starting emacs -q and evaluating:
(progn
(push "/opt/share/emacs/site-lisp/packages/ilisp" load-path)
(require 'ilisp)
(setq lisp-edit-file nil)
(setq lisp-find-definition-verbose-p t)
(setq allegro-program "allegro")
)
followed by M-. on BAR gives:
*Messages* buffer:
Finding any bar definitions
COMMON-LISP-USER::BAR is a generic function with 1 method.
lisp-find-next-possibility returned nil.
No more bar definitions in *cmulisp*.
lisp-next-definition returns nil.
Can't find any bar.
In Lisp:
(ilisp::source-file "BAR" "CL-USER" "any")
((:COMMENT "COMMON-LISP-USER::BAR is a generic function with 1 method.")
(:DEFINITION :NAME (METHOD COMMON-LISP-USER::BAR (COMMON-LISP-USER::FOO))
:TYPE :FUNCTION :FILES ("/r/tmp/ilisp-test.lisp"))
(:COMMENT "(SETF COMMON-LISP-USER::BAR) is a generic function with 1 method.")
(:DEFINITION :NAME
(METHOD (SETF COMMON-LISP-USER::BAR) (T COMMON-LISP-USER::FOO)) :TYPE
:FUNCTION :FILES ("/r/tmp/ilisp-test.lisp")))
T
So, ILISP::SOURCE-FILE is doing the right thing, but
LISP-FIND-NEXT-POSSIBILITY is losing.
This problem appears to be specific to the setf methods.
Doing M-. on FOO sucessfully finds the function definition for foo.
|