[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: Stefan Monnier
Subject: Re: 31395511: "Don’t attempt to modify constant strings"
Date: Fri, 05 Jun 2020 08:44:03 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> 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),

AFAIK there aren't any propertized strings in purespace, because
`purecopy` doesn't copy the properties:

    static Lisp_Object
    purecopy (Lisp_Object obj)
      if (FIXNUMP (obj)
          || (! SYMBOLP (obj) && PURE_P (XPNTR (obj)))
          || SUBRP (obj))
        return obj;    /* Already pure.  */
      if (STRINGP (obj) && XSTRING (obj)->u.s.intervals)
        message_with_string ("Dropping text-properties while making string `%s' 
                             obj, true);

-- Stefan

reply via email to

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