From: Daniel Colascione <dancol@dancol.org>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] trunk r116995: cl-lib defstruct introspection
Date: Mon, 21 Apr 2014 19:07:11 -0700 [thread overview]
Message-ID: <5355CECF.2050803@dancol.org> (raw)
In-Reply-To: <jwv1twqnnmu.fsf-monnier+emacsdiffs@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1501 bytes --]
On 04/21/2014 07:03 PM, Stefan Monnier wrote:
>> Can it? I tried it in vc-dir and got a completely unrelated ChangeLog hunk.
>
> Yes, there's a long-standing problem in vc-dir, such that it only works
> well if you mark the files you're going to commit (basically the
> changelog-copying feature needs the list of files that will be committed
> and vc-dir doesn't provide it unless you manually mark each file).
>
> Patch welcome.
>
>>>>> I'm curious: when/where did you bump against a need for that?
>>>> I have a few private macros that lexically bind structure slots,
>>> Which part makes it impossible/impractical to use standard accessors for
>>> that?
>> :conc-name, for starters. Also, :read-only, although you could argue
>> that you shouldn't go around mutating read-only slots anyway.
>
> I guess I don't know what you mean by "lexically bind structure slots".
> Can you give an example?
Something like this. (This is the private code I was talking about, so
it doesn't use the sames in the checked-in patch.)
(defmacro* jez-with-slots (spec-list (type inst) &body body)
"Like `with-slots', but for structs."
(if (symbolp inst)
`(symbol-macrolet
,(loop for spec in spec-list
collect `(,spec (jez-slot-value ',type ,inst ',spec)))
,@body)
(let ((inst-symbol (gensym "with-struct-slots")))
`(let ((,inst-symbol ,inst))
(jez-with-slots
,spec-list ,inst-symbol ,@body)))))
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]
next prev parent reply other threads:[~2014-04-22 2:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1Wbhqn-0001CJ-4X@vcs.savannah.gnu.org>
2014-04-20 12:49 ` [Emacs-diffs] trunk r116995: cl-lib defstruct introspection Stefan Monnier
2014-04-23 12:56 ` Stefan Monnier
2014-04-21 15:38 ` Stefan Monnier
2014-04-21 17:40 ` Daniel Colascione
2014-04-21 22:03 ` Stefan Monnier
2014-04-21 22:26 ` Daniel Colascione
2014-04-22 2:03 ` Stefan Monnier
2014-04-22 2:07 ` Daniel Colascione [this message]
2014-04-22 3:28 ` Stefan Monnier
2014-04-23 3:18 ` Declaim and proclaim (Was: Re: [Emacs-diffs] trunk r116995: cl-lib defstruct introspection) Daniel Colascione
2014-04-23 13:14 ` Declaim and proclaim Stefan Monnier
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=5355CECF.2050803@dancol.org \
--to=dancol@dancol.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@IRO.UMontreal.CA \
/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.