From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Daniel_Mart=C3=ADn?= Newsgroups: gmane.emacs.devel Subject: Re: Documentation for `seq-contains-p` is outdated Date: Sat, 29 Aug 2020 20:18:56 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38240"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin) Cc: emacs-devel@gnu.org To: Iwan in 't Groen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Aug 29 20:19:45 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kC5S3-0009rA-L1 for ged-emacs-devel@m.gmane-mx.org; Sat, 29 Aug 2020 20:19:43 +0200 Original-Received: from localhost ([::1]:55262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kC5S2-0001Dq-NC for ged-emacs-devel@m.gmane-mx.org; Sat, 29 Aug 2020 14:19:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46376) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kC5RX-0000nU-Um for emacs-devel@gnu.org; Sat, 29 Aug 2020 14:19:11 -0400 Original-Received: from sonic306-20.consmr.mail.ir2.yahoo.com ([77.238.176.206]:42679) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kC5RU-0002iK-MA for emacs-devel@gnu.org; Sat, 29 Aug 2020 14:19:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1598725143; bh=3e9wJWznZqHlqvZ0YZC3jkdF6Ax1v5OBXNErw/lddnc=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject; b=Hvq8XnYJwg9l9thZWNmsVxnFn636IjfDUVj+RC8caAWSyfpH57FxfZPzc7Lr2kj778LtNEbUtGVUq9ZoKmml3BKgAaJWJ4GTpzDNpsikgTUriNcD8wh0HL3pZgZGuGW94f41bz9UPKSJod/lLmLaQMXM81nQlMu94VK++mL7evAohi8iC5xZkNPfZ6jOMHhv5Rm8DlIeff+mKRLkf5MDICrdkkTRPPT9aRx0fbcG7ywRViGpXdft+ESiwACSsCUi3r3JyIK0XVrcBx2qNTV82BO1LhQZK1s1pUiq5XeiLf8hbgP/9DcUoDv2QCgkxSqcKWXYBg8Qmf8Ojnsh/17sJg== X-YMail-OSG: BgL3Cc4VM1l4QAjirObxirND0lDiNKYHRnu.SFmrCLHjt2xW6b.Pvx65yk53HOy S44nyNjrDEeoC9PZwBfiENWBrvmARHXTNr.RFOILj282tVgKuDmzJBk0zXHWqYk5A8x7kLVJK09R 8oHXorHXzxDze7G2LVrHEMn07nXNF7uy.bIm4dtgaxga7Uzv2GgsR3cIkcU84pyO2NcDx3ngVnYS FfOgN7vHMbmATcJi5TCPjrvxBPun5BPjNIfMlh8YIREeJMqDS8rLGR99wVHZV7mAVkmunis2ySDM o4LH873L.LEeQXf_dFUZeYlhPubC3oFL9UV5UN.Nrpx5ywKOYvWJMHx0j920tO1WRNcQF2dMlf.a A.E6TfKys3zsWk9WlbJ1ce_4dRcRcPGYvu0UqtsjHWwu0VtRsUIFUWxMY2ZAPzhfRRt36gTLK2ml YFfj498Wg9vYkfV5IFuabEoy1T0tTJZhgyHMIFkGFLXeeeg4bluKaQZhdh10scg_AT08k8CqnanL CiYrg9RjXB213bvhSE1TbHDlU82PA4lQb_6bJLrOP97QW9WB.JbuUB0a8ejsgC6domzvA2zUJlna Kce_ZxsO.2po5J3wuZ.roLc_lMJW4ra8aTZZSHQq7FGhdvV8StD97.c.ZhsMkga7zHHh8nHsYqA8 P6qxslzQJqX6uWXsCtqaLWg1UJQst6pKerDaMxKVxt6Ggk4az2gI5MqbWmRGwWzmgY3jqVGWYDV7 uswUMVFcVpKWpBHcYguWCxyQ8SzTcoSuMtVt_NYniXdi0l8hl.cfSWnzairdVYeP_.WtFTdzecnL ymG14_8MQMHmduVwRZct7NKmctAt7y.DE0WraQVO4u Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ir2.yahoo.com with HTTP; Sat, 29 Aug 2020 18:19:03 +0000 Original-Received: by smtp409.mail.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID e1f7caa133e39943df17e17351f6e5fd; Sat, 29 Aug 2020 18:18:58 +0000 (UTC) In-Reply-To: (Iwan in t. Groen's message of "Sat, 15 Aug 2020 16:14:19 +0200") X-Mailer: WebService/1.1.16565 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Apache-HttpAsyncClient/4.1.4 (Java/11.0.7) Received-SPF: pass client-ip=77.238.176.206; envelope-from=mardani29@yahoo.es; helo=sonic306-20.consmr.mail.ir2.yahoo.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/29 14:19:03 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:254394 Archived-At: Iwan in 't Groen writes: > Hi, > > When looking up the documentation for `seq-contains-p` it seems > outdated. > > M-x elisp-index-search RET seq-contains-p RET returns: > > -- Function: seq-contains-p sequence elt &optional function > This function returns non-=E2=80=98nil=E2=80=99 if at least one eleme= nt in SEQUENCE > is equal to ELT. If the optional argument FUNCTION is non-=E2=80=98n= il=E2=80=99, > it is a function of two arguments to use instead of the default > =E2=80=98equal=E2=80=99. > > (seq-contains '(symbol1 symbol2) 'symbol1) > =E2=87=92 symbol1 > (seq-contains '(symbol1 symbol2) 'symbol3) > =E2=87=92 nil > > The title is correct but the information shown is for the obsolete > `seq-contains` function. Thank you for your contribution to Emacs. The change looks good to me. If I'm not mistaken, this new function was introduced in 27.1, so this might be a safe patch for 27.2. I've only left a comment, but let's wait for other Emacs developers to do a proper review of this patch (Nicolas Petton seems like the best person to do so). > > diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi > index 91c3049f87..bb80307c8c 100644 > --- a/doc/lispref/sequences.texi > +++ b/doc/lispref/sequences.texi > @@ -784,18 +784,18 @@ Sequence Functions > > > @defun seq-contains-p sequence elt &optional function > - This function returns non-@code{nil} if at least one element in > + This function returns @code{t} if at least one element in If we change this in the manual, I think we should also change the documentation string for the function accordingly. I think that the change makes sense, because seq-contains-p is a yes-or-no predicate and "Return t if" complies with our tips for documentation strings. > @var{sequence} is equal to @var{elt}. If the optional argument > @var{function} is non-@code{nil}, it is a function of two arguments to > use instead of the default @code{equal}. > > @example > @group > -(seq-contains '(symbol1 symbol2) 'symbol1) > -@result{} symbol1 > +(seq-contains-p '(symbol1 symbol2) 'symbol1) > +@result{} t > @end group > @group > -(seq-contains '(symbol1 symbol2) 'symbol3) > +(seq-contains-p '(symbol1 symbol2) 'symbol3) > @result{} nil > @end group > @end example