bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#27584: 26.0.50; alist-get: Add optional arg TESTFN


From: Nicolas Petton
Subject: bug#27584: 26.0.50; alist-get: Add optional arg TESTFN
Date: Sun, 09 Jul 2017 21:18:01 +0200

Eli Zaretskii <address@hidden> 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.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]