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)))))