From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#27584: 26.0.50; alist-get: Add optional arg TESTFN Date: Sun, 9 Jul 2017 23:48:32 +0900 (JST) Message-ID: 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> <83a84fkv7i.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Trace: blaine.gmane.org 1499611763 28696 195.159.176.226 (9 Jul 2017 14:49:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 9 Jul 2017 14:49:23 +0000 (UTC) User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: Nicolas Petton , tino.calancha@gmail.com, 27584@debbugs.gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 09 16:49:19 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 1dUDWL-0006qe-1i for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Jul 2017 16:49:13 +0200 Original-Received: from localhost ([::1]:36392 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUDWQ-0005qG-JF for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Jul 2017 10:49:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47457) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUDWE-0005q8-7O for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 10:49:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUDWA-0005jN-Ac for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 10:49:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56322) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dUDWA-0005jF-6l for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 10:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dUDWA-0000Tn-0I for bug-gnu-emacs@gnu.org; Sun, 09 Jul 2017 10:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Jul 2017 14:49:01 +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.14996117231816 (code B ref 27584); Sun, 09 Jul 2017 14:49:01 +0000 Original-Received: (at 27584) by debbugs.gnu.org; 9 Jul 2017 14:48:43 +0000 Original-Received: from localhost ([127.0.0.1]:58999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUDVr-0000TE-JA for submit@debbugs.gnu.org; Sun, 09 Jul 2017 10:48:43 -0400 Original-Received: from mail-pf0-f179.google.com ([209.85.192.179]:34428) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dUDVp-0000T2-D2 for 27584@debbugs.gnu.org; Sun, 09 Jul 2017 10:48:41 -0400 Original-Received: by mail-pf0-f179.google.com with SMTP id q85so37792275pfq.1 for <27584@debbugs.gnu.org>; Sun, 09 Jul 2017 07:48:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=NGnpavKsy4Ktwif696pvS+PpyghVMLra4XBpRb+kF38=; b=bboj1QzMag2RLsttUV8GBigcKO4Vm3UdQ51kTgb5om7THZqTtCl/LvMnNhMDKUSGK9 BDGpswXMnxHI8s+1VhzdvQWKKmatC04YME3LQ6+mYokkS0qFsatDPvKDei4/EbYItDYJ 2inEgb9Jeh9TqjjCxCEtVhftlHtFNfVLH/F9z1xOMkxJiQZd9MDp9b2UZAxQvQPxghJ0 nfXi0D4pCJrMr6iwuMDWUJeCjsapaoFV+AjhjyQL8J6OGgn6PVFjaQ5YMZ9MOyOZykMe QoBZmB8xpA9einiWVXCQrUgx09umiyGdYMcsam2P/SrEGC6OqqhOlMUpTfUvDZyneiCC FdwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=NGnpavKsy4Ktwif696pvS+PpyghVMLra4XBpRb+kF38=; b=hQKsRXYiM+eGqxFZTCwtrI3pgHTe6s3DnToe24V/LYugrLRE4GUqox8wM6wuSuMCra dGMSy0wighr9QGQ9XpshkEXKHF8SsElv41sMgJOU4lAco+nf3Hl3GQY7Za8Sn6G6GFIZ uBNb9/AGOAmfD6gRLo7EtgbjetyHXgQtit+LFjPYVQFDl2hR8VgQO5TxqoU7PBJ+XPUB 3dmH50+/bIigIIj5sHwGTEiX1ltyCmfovDco0rflMc5A1Zs5imRCmF/+L7R1fvi4qcgS pDDVewiasUoa/1FNZwRY4z+VlUuSWo6qsnxz2x8f0zwsDPrDPW3ZQ8njH02ibmO3l41C a5Rw== X-Gm-Message-State: AIVw110MUcovaSGhRqh6WrC0hToV+wuPCuKFBLTX1h7ufzgLPM02Nx1n 03bIvsL6toLodw== X-Received: by 10.84.224.74 with SMTP id a10mr13759131plt.210.1499611715857; Sun, 09 Jul 2017 07:48:35 -0700 (PDT) Original-Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id o73sm18678388pfi.2.2017.07.09.07.48.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Jul 2017 07:48:35 -0700 (PDT) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc In-Reply-To: <83a84fkv7i.fsf@gnu.org> 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:134360 Archived-At: On Sat, 8 Jul 2017, Eli Zaretskii wrote: >> 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; > } Nice!