Re: [Ilisp-help] edit-definitions-lisp problems

Lynn Quam <[email protected]> Thu, 18 Dec 2003 09:39:19 -0800
Newsgroups gmane.lisp.ilisp.devel,gmane.lisp.ilisp.general
Message-ID <[email protected]>
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.



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click