Subject: Re: setf functions
From: Erik Naggum <erik@naggum.no>
Date: 2000/04/05
Newsgroups: comp.lang.lisp
Message-ID: <3163950557082770@naggum.no>

* Harald Hanche-Olsen <hanche@math.ntnu.no>
| My point is that, as far as I can understand the Hyperspec, there is
| no way to do this for a function returning multiple values, since the
| form should be a place, which by definition can only refer to a single
| value.  I'd love to be proved wrong on this one, though.  Or even if I
| am right, maybe there is a more natural way to attack the problem?

  apart from actually working, what's wrong with this example?

(defstruct display
  x y)

(defun global-pointer-position (object)
  (values (display-x object) (display-y object)))

(defsetf global-pointer-position (object) (new-x new-y)
  `(setf (display-x ,object) ,new-x
	 (display-y ,object) ,new-y))

#:Erik