Eli Zaretskii writes: >> What solution did you have in mind? > > Something like this: > > FOR_EACH_TAIL (tail) > { > Lisp_Object car = XCAR (tail); > if (CONSP (car) > && (NILP (testfn) > ? (EQ (XCAR (car), key) || !NILP (Fequal (XCAR (car), key))) > : !NILP (call2 (testfn, XCAR (car), key)))) > return car; > } Thanks, it's indeed much better.