all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Leo Liu <sdl.web@gmail.com>
Cc: 17630@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	[thread overview]
Message-ID: <jwvzjhy9fwj.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <m3egzamyxk.fsf@gmail.com> (Leo Liu's message of "Sat, 31 May 2014 11:04:07 +0800")

> +(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





  parent reply	other threads:[~2014-05-31 14:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-29 11:36 bug#17630: 24.3.91; gv expander for a few places are incorrect Leo Liu
2014-05-29 13:18 ` Stefan Monnier
2014-05-30  3:46   ` Leo Liu
2014-05-30 16:20     ` Stefan Monnier
2014-05-31  3:04       ` Leo Liu
2014-05-31 14:32         ` Stefan Monnier
2014-05-31 14:37         ` Stefan Monnier [this message]
2014-05-31 15:47           ` Leo Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvzjhy9fwj.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=17630@debbugs.gnu.org \
    --cc=sdl.web@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.