[slime-devel] Re: Small fixes

Antonio Menezes Leitao aml at gia.ist.utl.pt
Thu Nov 23 13:00:28 UTC 2006

Nikodemus Siivola <nikodemus at random-state.net> writes:

> I would greatly prefer to be offered both (SETF CAR) and CAR. 
> Also, consider setf-expansions:
>   (defun mycar (x) (car x))
>   (defun setmycar (x y) (setf (car x) y))
>   (defsetf mycar setmycar)
> What should happen in this?
>   (setf (my.car *x*) 42)

IMHO, we should jump to the defsetf form.

Then, moving the point to setmycar, we can jump to the setmycar
definition.  In case we move the point to mycar, we can jump to the
mycar definition (if it exists).

This seems consistent behaviour, to me.

> IMO ideally the user would be presented with all three possibilities
> in the XREF buffer, or just MYCAR and the (DEFSETF MYCAR).

If I'm allowed to vote, I vote for presenting just the defsetf because
it's the form that allows you to write (setf (mycar ...)  ...) in the
first place.  In your example, mycar is also a defined function but,
for defsetf purposes, that's irrelevant.  As a result, it shouldn't be
presented as relevant.  But that's just my opinion and I will not be
bothered if you choose to implement it the way as you seem to prefer.

António Leitão.

More information about the slime-devel mailing list