GNU bug report logs - #20153
24.4.91; destructive add-face-text-property and string deep copying

Previous Next

Package: emacs;

Reported by: Oleh Krehel <ohwoeowho <at> gmail.com>

Date: Fri, 20 Mar 2015 12:33:02 UTC

Severity: minor

Tags: fixed

Merged with 27433

Found in versions 24.4.91, 25.2

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 20153 <at> debbugs.gnu.org, ohwoeowho <at> gmail.com
Subject: bug#20153: 24.4.91; destructive add-face-text-property and string deep copying
Date: Wed, 09 Oct 2019 21:06:54 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: ohwoeowho <at> gmail.com,  20153 <at> debbugs.gnu.org
> Date: Wed, 09 Oct 2019 19:45:54 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> Instead I've now changed add_properties (and add_text_properties_1) to
> >> take a bool parameter to say whether they're allowed to be destructive
> >> or not, and make the add-face-text-property call that with false as the
> >> parameter if the object is a string.  This fixes the test case for me
> >> and should hopefully have no measurable performance impact.
> >
> > Isn't that a backward-incompatible change?
> 
> It is, but the previous behaviour was a bug.  If you have a copy of a
> string and modify the copy, the original string shouldn't change.

AFAIU, the string didn't change, only its plist did.  Right?

Please bring this up on emacs-devel, and if no one objects to the
change, we should at least mention it in NEWS.

Thanks.




This bug report was last modified 5 years and 230 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.