[pro] definitional home
Alessio Stalla
alessiostalla at gmail.com
Mon Mar 28 21:59:47 UTC 2011
On Mon, Mar 28, 2011 at 10:24 PM, Mark H. David <mhd at yv.org> wrote:
> Yeah, that would be great. We had a bit of a discussion of this sort of
> functionality on the slime-devel mailing list.
> Nobody had any easy answers, even for just SBCL and CCL, which I would
> have settled for.
> It was also pointed out that there's a basic first level of
> functionality, permitting meta-. to work.
> Then, the next level preserves source location of subforms of a body of
> Lisp code to support "PC to Source" mapping.
> This doesn't seem all that hard to do at least a first-level version, at
> least with the stuff SLIME can already do.
> And then encapsulating it in a Library would be great. Excellent
> library candidate.
I think it would be best done by implementers (a CDR?) rather than
being a library, since it interferes quite deeply with the reader. I
agree that doing the first level is not hard; the next level is not
hard either, conceptually - but since you can't have the reader record
all the subforms when you're only interested in a few of them, you'd
need some way to mark the forms you're interested in, e.g.
#.(reader:record-next-form (form file line column) (setf (get
'some-symbol 'some-property) (list form file line column)))
(yadda-yadda-yadda)
-->
(progn
(let ((form '#1=(yadda-yadda-yadda)) (file "foo.lisp") (line 123) (column 42))
(setf (get 'some-symbol 'some-property) (list form file line column)))
#1#)
Or something like that.
> Hope someone will do this -- it will be really worthwhile and make a lot
> of developers happy.
I'm not a SLIME hacker, but I'm a contributor to ABCL. I'm willing to
experiment with the CL implementation side of this, to produce an API
that SLIME and other clients could use. If I'll think I'm successful
and if there will be enough interest and consensus, I could also
propose it as a CDR.
Cheers,
Alessio
More information about the pro
mailing list