Eric Abrahamsen writes: > Lars Ingebrigtsen writes: > >> Eric Abrahamsen writes: >> >>> Huh, I didn't realize that list-based structs didn't put a tag in the >>> `car' position unless you pass the :named keyword. >>> >>> We could switch to list-based structs without breaking out-of-tree code, >>> but I don't see much point: you can't use them for generic function >>> dispatch, even when they're :named, nor do you get a NAME-p predicate >>> for free. That doesn't leave much point. >> >> It means that you don't have to write the accessor macros by hand. :-) > > But you already did! :) > > Okay, let's use them anyway. And I'd like to move the "extend" and > "vacuum" procedures to the reading and writing of the newsrc.eld file, > so the rest of the code can forget about it. I'll leave the setter > macros in place, and continue to accept (and ignore) an EXTEND argument, > so other people's code continues to work. Okay, here's what the patch looks like now. 1. gnus-info is defined with defstruct, and the constructor arglist looks like: (group rank read &optional marks method params), meaning that if you have an info list that may or may not be fully extended, you can run it through the constructor and all the missing elements will be set to their default (nil). 2. This is done when reading the newsrc.eld file (and creating new groups), and all the other uses of the 'extend argument have been removed.` 3. The bit that chops off nils from the end of infos has been moved from `gnus-update-marks' to `gnus-gnus-to-quick-newsrc-format', so it only happens right at the last minute, when saving. 4. I've changed `gnus-set-info' to update each element of an info individually, rather than just replacing the whole thing. This looks stupid, but preserves object reference, meaning we no longer need to mess with the `gnus-newsrc-alist' in `gnus-group-set-info', which was causing trouble for people. It's going to be a bit slower, but I don't think this is super performance-crucial. I think that's it... This still needs some testing, but I'm optimistic.