From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#27584: 26.0.50; alist-get: Add optional arg TESTFN Date: Sat, 08 Jul 2017 14:46:09 +0300 Message-ID: <83a84fkv7i.fsf@gnu.org> References: <87tw2rva7v.fsf@calancha-pc> <87mv8j6y1z.fsf@petton.fr> <87y3s2m76v.fsf@calancha-pc> <8760f562bo.fsf@petton.fr> <877ezk3g4p.fsf@calancha-pc> <874luovf7a.fsf@petton.fr> <87shi8tzkr.fsf@petton.fr> <8737a858so.fsf@petton.fr> <83wp7jl9uf.fsf@gnu.org> <83lgnzl7rl.fsf@gnu.org> <87inj3411g.fsf@petton.fr> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1499514444 1294 195.159.176.226 (8 Jul 2017 11:47:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 8 Jul 2017 11:47:24 +0000 (UTC) Cc: tino.calancha@gmail.com, 27584@debbugs.gnu.org, monnier@iro.umontreal.ca To: Nicolas Petton Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 08 13:47:18 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dToCe-00088R-SA for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Jul 2017 13:47:12 +0200 Original-Received: from localhost ([::1]:60703 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dToCj-0002uE-4k for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Jul 2017 07:47:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43626) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dToCY-0002sk-JA for bug-gnu-emacs@gnu.org; Sat, 08 Jul 2017 07:47:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dToCU-0008Nx-J6 for bug-gnu-emacs@gnu.org; Sat, 08 Jul 2017 07:47:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54709) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dToCU-0008Nh-FF for bug-gnu-emacs@gnu.org; Sat, 08 Jul 2017 07:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dToCU-0002bQ-5d for bug-gnu-emacs@gnu.org; Sat, 08 Jul 2017 07:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Jul 2017 11:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27584 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27584-submit@debbugs.gnu.org id=B27584.14995143969971 (code B ref 27584); Sat, 08 Jul 2017 11:47:02 +0000 Original-Received: (at 27584) by debbugs.gnu.org; 8 Jul 2017 11:46:36 +0000 Original-Received: from localhost ([127.0.0.1]:57386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dToC3-0002ak-R4 for submit@debbugs.gnu.org; Sat, 08 Jul 2017 07:46:36 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52531) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dToC1-0002aY-OU for 27584@debbugs.gnu.org; Sat, 08 Jul 2017 07:46:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dToBs-0008Fl-M7 for 27584@debbugs.gnu.org; Sat, 08 Jul 2017 07:46:28 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38654) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dToBs-0008Fh-Ib; Sat, 08 Jul 2017 07:46:24 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1863 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dToBr-0007Df-Nl; Sat, 08 Jul 2017 07:46:24 -0400 In-reply-to: <87inj3411g.fsf@petton.fr> (message from Nicolas Petton on Sat, 08 Jul 2017 13:32:11 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:134333 Archived-At: > From: Nicolas Petton > Cc: monnier@iro.umontreal.ca, 27584@debbugs.gnu.org > Date: Sat, 08 Jul 2017 13:32:11 +0200 > > > That's one way, yes. But not necessarily the one I had in mind. > > 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; }