[Top][All Lists]

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

Re: 31395511: "Don’t attempt to modify constant strings"

From: Paul Eggert
Subject: Re: 31395511: "Don’t attempt to modify constant strings"
Date: Thu, 4 Jun 2020 23:44:59 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

On 6/4/20 7:09 PM, Clément Pit-Claudel wrote:
> On 04/06/2020 19.10, Paul Eggert wrote:
>>  I don't think this matters much, since string literals shouldn't have
>> text properties.
> Really? I've used the reader syntax for propertized strings a few times — 
> it's pretty convenient.

Oh, you're right. That's a special case for the same reason that the reader
syntax for ordinary string literals is a special case; these strings are 

In the implementation that I have in mind, reading the syntax for a propertized
string gives you a string constant, in that the interpreter signals an error if
you try to change the string's characters or its text properties slot - but the
implementation does not prevent you from using setcar or setcdr on the text
properties list. Perhaps some day later we can add further checking to prevent
that sort of funny business on string constants' properties, but one thing at a

If memory serves, it wasn't that long ago that the Elisp interpreter prevented
you from doing that sort of funny business on propertized string constants (at
least when they were in pure space), but we've fallen back a bit on our runtime

reply via email to

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