Subject: Re: bug#17630: 24.3.91; gv expander for a few places are incorrect

From: Stefan Monnier <[email-masked]>
Date: Sat, 31 May 2014 10:37:12 -0400

> +(gv-define-setter window-buffer (v &optional w)
> +  `(progn (set-window-buffer ,w ,v) ,v))

Actually, this is wrong.  C-h f gv-define-setter says:

   The first arg in ARGLIST (the one that receives VAL) receives an
   expression which can do arbitrary things, whereas the other arguments
   are all guaranteed to be pure and copyable.

So using ,v twice will cause havoc in things like

   (setf (window-buffer foo) (pop buffer))

-- Stefan