From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#63509: [PATCH] Make copy-tree work with records Date: Thu, 18 May 2023 13:53:59 +0300 Message-ID: <838rdlx648.fsf@gnu.org> References: <87fs7yfdg2.fsf@breatheoutbreathe.in> <83lehp25ug.fsf@gnu.org> <87sfbxtoib.fsf@breatheoutbreathe.in> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26131"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63509@debbugs.gnu.org, monnier@iro.umontreal.ca To: Joseph Turner Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 18 12:54:16 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1pzbGy-0006X5-No for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 18 May 2023 12:54:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pzbGm-0006vk-PB; Thu, 18 May 2023 06:54:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pzbGk-0006vM-JI for bug-gnu-emacs@gnu.org; Thu, 18 May 2023 06:54:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pzbGk-0002o8-Ay for bug-gnu-emacs@gnu.org; Thu, 18 May 2023 06:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pzbGj-0006d2-Pg for bug-gnu-emacs@gnu.org; Thu, 18 May 2023 06:54:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 May 2023 10:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63509 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 63509-submit@debbugs.gnu.org id=B63509.168440723525469 (code B ref 63509); Thu, 18 May 2023 10:54:01 +0000 Original-Received: (at 63509) by debbugs.gnu.org; 18 May 2023 10:53:55 +0000 Original-Received: from localhost ([127.0.0.1]:52146 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzbGd-0006cj-Ag for submit@debbugs.gnu.org; Thu, 18 May 2023 06:53:55 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pzbGb-0006cV-Cc for 63509@debbugs.gnu.org; Thu, 18 May 2023 06:53:54 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pzbGU-0002lQ-Vl; Thu, 18 May 2023 06:53:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=kVN6HaydeKpX8MqAU4sBuNn+pxlzeMQ3WtDHuINCfh0=; b=oOBjp3OzxdXK F7IUF13bDRFQfG2BR/cDwhhakVI3lMTAdUo4RK80fsQVE4kGF1eNSoJ9h5fdH4sZE5QGpPZYpN/b2 vjPLu8l9fQ+KsLvbeHbndWfUJ3WPxz/wlyxI7JWjJelkPLmTtaP2LasuiaNfLnnGSX89bjmy2i5l7 DjvPcggOC7EjJ1DNmud8buzr6sg8B5d1fWaJsneUbhTZY7dk6mRcRVyOC7/6s6RlBdVpdfMy3U1QH I+LlIRrCg0ra1GOXlStU9ADGswpxva1FytrC29dDv6mWkB1/cQHlfCjuflte0g+/Fm4kB4CYGq/Fy sfkYr3w+NAcflaYVZnzOWw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pzbGU-00060s-Cw; Thu, 18 May 2023 06:53:46 -0400 In-Reply-To: <87sfbxtoib.fsf@breatheoutbreathe.in> (message from Joseph Turner on Mon, 15 May 2023 10:59:57 -0700) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:261916 Archived-At: > From: Joseph Turner > Cc: Stefan Monnier , 63509@debbugs.gnu.org > Date: Mon, 15 May 2023 10:59:57 -0700 > > Eli Zaretskii writes: > > > - NEWS entry > > I updated the 29 entry. Should I move it to 30? Yes, this new feature will be installed on the master branch, which will become Emacs 30. > --- a/doc/lispref/records.texi > +++ b/doc/lispref/records.texi > @@ -81,6 +81,18 @@ This function returns a new record with type @var{type} and > @end example > @end defun > > +@defun copy-tree tree &optional vector-like-p > +This function copies a record when @var{vector-like-p} is > +non-@code{nil}. > + > +@example > +@group > +(copy-tree (record 'foo "a")) > + @result{} #s(foo "a") > +@end group > +@end example > +@end defun This addition is redundant. We don't describe the same function in more than one place. If there are reasons to mention it in other places, we just add there a short note with a cross-reference to the detailed description. > ++++ > +** 'copy-tree' now correctly copies records when its optional second The "correctly" part hints that the previous behavior was a bug, which it wasn't (and we don't mention bugfixes in NEWS anyway). So I would rephrase 'copy-tree' can now copy records as well, when its optional... > +argument is non-nil. The second argument has been renamed from VECP > +to VECTOR-LIKE-P since it now works with both vectors and records. The last sentence should be removed: we don't mention such minor details in NEWS, unless the change is an incompatible change. Last, but not least: please always accompany your changes with ChageLog-style commit log messages describing the changes. You can find more information about this in the file CONTRIBUTE in the Emacs tree, and you can see many examples by typing "git log" in the repository. Thanks.