>>>> "Ben" == Ben Wing <ben(a)666.com>
writes:
Ben> martin, what are you smoking? as i read through your diatribe
Ben> here, the idea that _NO_DECLARE should indeed not declare any of
Ben> its variables is the only thing i agreed with. but i could have
Ben> sworn that i did indeed do this -- and i did!
Ben> there is no EXTERNAL_LIST_LOOP_2_NO_DECLARE.
Hmmm. You're right. Since there's a EXTERNAL_LIST_LOOP_4_NO_DECLARE,
shouldn't there be an analogous EXTERNAL_LIST_LOOP_2_NO_DECLARE for
consistency?
(Of course, assuming we keep the API change to the EXTERNAL_LIST_LOOP
macros, which I think is a bad idea).
Ben> the docs for EXTERNAL_LIST_LOOP_4_NO_DECLARE read
Ben> EXTERNAL_LIST_LOOP_4_NO_DECLARE is like EXTERNAL_LIST_LOOP_4 but none
Ben> of the variables are automatically declared, and so you need to declare
Ben> them yourself. (ELT and TAIL are Lisp_Objects, and LEN is an EMACS_INT.)
Ben> go look at the source.
See how the first thing the EXTERNAL_LIST_LOOP_4_NO_DECLARE macro
below does is *declare* a variable? Do you see how this could confuse
people? To get *no* declarations (and therefore no need for extra
braces), you use PRIVATE_EXTERNAL_LIST_LOOP_6.
#define EXTERNAL_LIST_LOOP_4_NO_DECLARE(elt, list, tail, len) \
Lisp_Object tortoise_##elt; \
PRIVATE_EXTERNAL_LIST_LOOP_6 (elt, list, len, tail, \
tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH)
By the way, I don't understand why PRIVATE_EXTERNAL_LIST_LOOP_6 has
been renamed to be PRIVATE_ . I intended this function to be part of
the public API. There certainly are cases where a user would want to
use this full version, for example to use a better value for
suspicion_length.
I still think we should revert to the prior *_EXTERNAL_LIST_LOOP_* API.
Martin