GNU bug report logs - #17630
24.3.91; gv expander for a few places are incorrect

Previous Next

Package: emacs;

Reported by: Leo Liu <sdl.web <at> gmail.com>

Date: Thu, 29 May 2014 11:38:01 UTC

Severity: normal

Found in version 24.3.91

Done: Leo Liu <sdl.web <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 17630 <at> debbugs.gnu.org
Subject: bug#17630: 24.3.91; gv expander for a few places are incorrect
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




This bug report was last modified 11 years and 44 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.