On 02/06/2017 07:37 AM, Eli Zaretskii wrote: > Why is it so important to make sure it doesn't survive the loop? If > for optimizations, then I'd expect modern compilers to be smart enough > to produce the same code whether it does or doesn't survive. It's not so much compilers as human readers of the code. Admittedly it is a minor issue. > We have similar macros elsewhere, e.g. FOR_EACH_FRAME, > FOR_EACH_BUFFER, etc. It's IMO a pity to have this one different. Good point, I had forgotten about that. I installed the attached patch, which changes FOR_EACH_TAIL to act more like these other macros. That is. FOR_EACH_TAIL (tail) now updates 'tail' each time through the loop, and the caller needs to declare the 'tail' variable outside the loop; this is as it was before.