bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#63509: [PATCH] Make copy-tree work with records


From: Eli Zaretskii
Subject: bug#63509: [PATCH] Make copy-tree work with records
Date: Thu, 18 May 2023 13:53:59 +0300

> From: Joseph Turner <joseph@breatheoutbreathe.in>
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 63509@debbugs.gnu.org
> Date: Mon, 15 May 2023 10:59:57 -0700
> 
> Eli Zaretskii <eliz@gnu.org> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]