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: Fri, 07 Jul 2017 15:39:18 +0900 Message-ID: <877ezk3g4p.fsf@calancha-pc> References: <87tw2rva7v.fsf@calancha-pc> <87mv8j6y1z.fsf@petton.fr> <87y3s2m76v.fsf@calancha-pc> <8760f562bo.fsf@petton.fr> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1499409613 19716 195.159.176.226 (7 Jul 2017 06:40:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 7 Jul 2017 06:40:13 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 27584@debbugs.gnu.org, stefan monnier To: Nicolas Petton Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 07 08:40:09 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 1dTMvt-0004mG-W7 for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 Jul 2017 08:40:06 +0200 Original-Received: from localhost ([::1]:54831 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTMvz-0007SF-EI for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 Jul 2017 02:40:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49554) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTMvt-0007Qm-NV for bug-gnu-emacs@gnu.org; Fri, 07 Jul 2017 02:40:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dTMvq-0005cP-MX for bug-gnu-emacs@gnu.org; Fri, 07 Jul 2017 02:40:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53009) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dTMvq-0005cF-ID for bug-gnu-emacs@gnu.org; Fri, 07 Jul 2017 02:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dTMvq-0005jQ-4z for bug-gnu-emacs@gnu.org; Fri, 07 Jul 2017 02:40: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: Fri, 07 Jul 2017 06:40: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.149940958922007 (code B ref 27584); Fri, 07 Jul 2017 06:40:02 +0000 Original-Received: (at 27584) by debbugs.gnu.org; 7 Jul 2017 06:39:49 +0000 Original-Received: from localhost ([127.0.0.1]:55686 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dTMvc-0005is-TD for submit@debbugs.gnu.org; Fri, 07 Jul 2017 02:39:49 -0400 Original-Received: from mail-pf0-f170.google.com ([209.85.192.170]:36748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dTMvZ-0005if-QS for 27584@debbugs.gnu.org; Fri, 07 Jul 2017 02:39:47 -0400 Original-Received: by mail-pf0-f170.google.com with SMTP id q86so12472013pfl.3 for <27584@debbugs.gnu.org>; Thu, 06 Jul 2017 23:39:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=h7m1rmKMQTRyZAbqIfTcEeMCQxAdWo4cgdbXU8AUIGA=; b=GLuSFQS4Q5cRUY41J3Ry4HyVpG8dc15LhWiwE56AFBiNUE0KF6UoFEJV3XKTNj8tqf mpo7abeOHl/IeCJrRQ4k4qONImRsf6kzIiMFvv6MWzr+q6+HeRzGHwHoc76fToIZ/G9m PEeZOvXVyl1vRmwfhKRWqzBO7osutiOYhLcFtiX7LKlo8L41mOx3cbQ29B48dJK32eUk OB6GXnDlpO30t6mce/sjYxbIRuii5+z7B4G70IBwng2qguCgwWU+CBZ+mBzXUp4hch0L J9OQoOgykmT1O7XE8TyPHWPLZz2Z4hDVbdb4rEzrJ7yfsE7O4Shqidb7x62uN/qOMXTm nF4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=h7m1rmKMQTRyZAbqIfTcEeMCQxAdWo4cgdbXU8AUIGA=; b=ffwKsAGGiKdTq8yRKDJeSZoz7twHt2pizvUfQACpmPQX1LaShW5q7kIm0npK55K6ba 4/rfnpUsZ3U6nbGgSgtVmkCQ/Z3oexHx+ELwIeysEcO4jun358ZGi8tt7c++vRnDS9Jh wQoEGbtcUHJEv+bLoL/aVMA8MuXvgqtMnZL3lmLdpgCq51mH+cT1MzOMfyhLDKZakcfD rj5lyFZwhQCwW2zL7dtwQ26trM8bh6N4OypabtwKN8PSl30fdxEf0jXFreSifl2KOWmw F93kA7sKoSkRSwfVmeCuk6Be/TQP4AIEuAad++zFCRHSy6cLKeL57FrL0aCpba6yFGmj 6f0A== X-Gm-Message-State: AIVw110jOh4rrXkF3QtQ9UjxL67dCzL341sc32i5rJRmERaiFAUuEfn3 hENYiuc8V6pXKQ== X-Received: by 10.84.224.134 with SMTP id s6mr1202501plj.263.1499409579622; Thu, 06 Jul 2017 23:39:39 -0700 (PDT) Original-Received: from calancha-pc (222.139.137.133.dy.bbexcite.jp. [133.137.139.222]) by smtp.gmail.com with ESMTPSA id 22sm4672579pgb.23.2017.07.06.23.39.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Jul 2017 23:39:38 -0700 (PDT) In-Reply-To: <8760f562bo.fsf@petton.fr> (Nicolas Petton's message of "Thu, 06 Jul 2017 16:56:59 +0200") 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:134289 Archived-At: Nicolas Petton writes: > Tino Calancha writes: > > >> 1. In my patch `assoc-predicate' is a defsubst. >> Should does exit at all? > > I would inline its call and use `assoc-default' directly, but I guess > it's a matter of taste. Following Stefan suggestion, we can optimize using a compiler macro. Then, `assoc-default' is just the default case. > > But wouldn't it be better if `assoc' took an optional testfn? I'm not > sure I like the `full' parameter in `assoc-default', and I think the > inconsistency of the return values between `assoc' and `assoc-default' > is already confusing. In fact, that would kill 2 birds in a shot.