1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 14:30:50 -08:00

Move the entry about 'format' into Incompatible Lisp Changes

* etc/NEWS: Move the entry about 'format' refraining from allocating
new strings into Incompatible Lisp Changes.  (Bug#28625)
This commit is contained in:
Eli Zaretskii 2017-10-07 14:32:12 +03:00
parent 75174a632d
commit dc6ae15a8d

View file

@ -1361,6 +1361,15 @@ non-nil, but the code returned the list in the increasing order of
priority instead. Now the code does what the documentation says it priority instead. Now the code does what the documentation says it
should do. should do.
+++
** 'format' now avoids allocating a new string in more cases.
'format' was previously documented to return a newly-allocated string,
but this documentation was not correct, as (eq x (format x)) returned
t when x was the empty string. 'format' is no longer documented to
return a newly-allocated string, and the implementation now takes
advantage of the doc change to avoid making copies of strings in
common cases like (format "foo") and (format "%s" "foo").
--- ---
** The function 'eldoc-message' now accepts a single argument. ** The function 'eldoc-message' now accepts a single argument.
Programs that called it with multiple arguments before should pass Programs that called it with multiple arguments before should pass
@ -1556,13 +1565,6 @@ Emacs integers with %e, %f, or %g conversions. For example, on these
hosts (eql N (string-to-number (format "%.0f" N))) now returns t for hosts (eql N (string-to-number (format "%.0f" N))) now returns t for
all Emacs integers N. all Emacs integers N.
+++
** 'format' is no longer documented to return a newly-allocated string.
This documentation was not correct, as (eq x (format x)) returned t
when x was the empty string. 'format' now takes advantage of the doc
change to avoid making copies of strings in common cases like (format
"foo") and (format "%s" "foo").
--- ---
** Calls that accept floating-point integers (for use on hosts with ** Calls that accept floating-point integers (for use on hosts with
limited integer range) now signal an error if arguments are not limited integer range) now signal an error if arguments are not