retitle 27117 26.0.50; cl-print loops endlessly on circular objects if print-circle is nil tags 27117 patch quit Stefan Monnier writes: > > Indeed, prin1 has a two ways to prevent infinite recursion: > - limit the print to a certain depth > - detect when we start printing that we're already in the process of > printing, and then replace it with #N where N is some kind of depth of > the reference (so #0 refers to the whole object that we're in the > process of printing). > > cl-prin1 doesn't offer these safety belts, currently (I always set > print-circle). Oh, I see, it's not specific to bytecode functions at all. Here's a patch implementing the 2nd safety belt: