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

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

bug#31688: 26.1.50; Byte compiler confuses two string variables


From: Drew Adams
Subject: bug#31688: 26.1.50; Byte compiler confuses two string variables
Date: Sat, 2 Jun 2018 17:40:47 -0700 (PDT)

> just searched the Elisp reference
> looking for any any warnings not to use destructive functions on
> literals, and didn't find anything. 

It's not really about destructive functions.

It's about the fact that you might not have two different
strings, and you should not assume that you do.

It's about `eq'.  For the Emacs byte-compiler, apparently,
multiple occurrences of a string literal in the code are
compiled to the same string object.  Thinking you have two
separate strings is the problem.  Anything you might want
to think or say about the use of "destructive" functions
follows from the fact that you have a single string.







reply via email to

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