all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Stefan Merten <smerten@oekonux.de>
Cc: Jonathan Yavner <jyavner@member.fsf.org>, emacs-devel@gnu.org
Subject: Re: testcover: setf-method and treatment of `defcustom'
Date: Thu, 13 Sep 2012 09:09:13 -0400	[thread overview]
Message-ID: <jwvpq5qcc1q.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <7050.1347482308@theowa.merten-home.homelinux.org> (Stefan Merten's message of "Wed, 12 Sep 2012 22:38:28 +0200")

>> Does one of the 2 patches work?
> I'd need to compile and install an Emacs 24 version for this to try.

Actually, not just "Emacs 24" but "Emacs trunk" because it uses gv.el
which is new on the trunk.  For older Emacsen, I'd have to use
define-setf-expander which is a pain the rear.

>> But your `(setf ,val ,store) will end up changing some temporary
>> variable rather than changing the I'th slot of the A vector.
> Oops. My intention with ",val" was to expand the original form before
> binding it to val into this place so `setf' treats the original form.
> May be that's not possible with `defsetf'.

Indeed, that's not possible with `defsetf' which is macro designed
specifically for setters that do not care about the shape of their
argument, but only about the value they return.

>> My 1st patch has the downside that it doesn't call testcover-after at all.
>> The reason is that I don't know what VAL to set in IDX when we do
>> things like (push VAL (testcover-after IDX PLACE)): should it be the
>> value read before pushing VAL onto it, or the value set afterwards?
> My cent: Before pushing VAL. AFAICS `testcover-after' needs to see
> PLACE unmodified.

So for (setf (testcover-after IDX PLACE) VAL), we should first read the
value of PLACE, pass it to testcover-after, and then modify PLACE to
have value VAL?


        Stefan



  reply	other threads:[~2012-09-13 13:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-10  7:11 testcover: setf-method and treatment of `defcustom' Stefan Merten
2012-09-11  3:40 ` Stefan Monnier
2012-09-12 20:38   ` Stefan Merten
2012-09-13 13:09     ` Stefan Monnier [this message]
2012-09-13 20:45       ` Stefan Merten
2012-09-16  9:06   ` Stefan Merten
2012-09-18 21:37     ` Stefan Monnier
2012-09-12 19:32 ` Stefan Merten

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=jwvpq5qcc1q.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=jyavner@member.fsf.org \
    --cc=smerten@oekonux.de \
    /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.