Apologies for the wide crosspost. You're getting this mail because
you're the contact point for one or more of ILISP, ELI, SLIME,
Jabberwocky or Portable Hemlock, or you're on sbcl-devel.=20=20
The Reply-to is set to navel@..., a brand-new list for
discussing Lisp introspection issues. I think I've configured it to
allow posts from non-members for the time being, though that will
probably change in a few days.
This is a note to alert everyone I can think of to the news that I'm
creating a "supported" interface for SBCL to support some intersection
of these needs. This will be an SBCL contrib package: so far, it
contains outline definitions of VALID-FUNCTION-NAME-P,
FUNCTION-ARGLIST, and FIND-DEFINITION. I'd be interested to see
discussion and requests from the likely users of this interface, and
also in hearing from Lisp implementation hackers who would like to
implement the same or similar interface in their Lisp implementation.
Sourceforge cvsweb is being laggy as usual, so for the time being I've
stuck the work-in-progress source file up at=20
Here's a question to start with: the internal interface to "where is
the source of this function" in SBCL returns the offset within the
file as a number of forms, not a character position. Is this a good
thing or a bad thing?
For: if the file has been edited since it was last compiled, a
form-number is more likely to still be correct than a character offset
Against: For non-Lisp editors a character position would be more
desirable: even for Emacs, you'd have to do special things to the
reader to cope with conditionals, read-macros etc.
The idea I had on the way back from lunch was to have SBCL convert
form offsets into character positions, then in Emacs set markers in
those places when the file is first visited. We'd then treat
character positions passed back from find-definition-source calls
as opaque cookies that map to the markers on each form.
I don't do a lot of elisp, though, and the manual warns that using
lots of markers in a file may slow down editing; I don't know if the
slowdown is likely to be visible on modern machines or if that warning
has been there forever: I can't see any intrinsic reason that it
should be slower than, say, editing a file with text properties. Even
if it is, maybe we could fake it with invisible text properties
instead. Elisp hackers?
http://web.metacircles.com/cirCLe_CD - Free Software Lisp/Linux distro