Subject: bug#12314: 24.2.50; `add-to-history': use `setq' with `delete'

From: Eli Zaretskii <[email-masked]>
Date: Sun, 09 Sep 2012 00:21:57 +0300

> From: "Drew Adams" <[email-masked]>
> Cc: <[email-masked]>, <[email-masked]>
> Date: Sat, 8 Sep 2012 09:42:59 -0700
> 
> > Why is it even necessary to talk about destructive modifications, if
> > we are to advise to assign the result anyway?
> 
> Not sure I understand the question.  It is because these operations can be
> destructive of list structure that we advise that.

If you need to forget about the old value and assign the new one
returned by 'delete', why does it matter that the modification was
destructive?  That pertains to the old value that you need to toss
anyway.

> If you have variables that point to some list structure that you modify somehow,
> then it is up to you to ensure that the variables point to what you want them to
> point to after such modification.

Variables that point to that list structure will point to something
whose value is unpredictable, a.k.a. "garbage".  It is enough to say
that the old value is garbage and shouldn't be used, IMO.

> It all depends on what you want/need.

You can never want/need the old value, because you cannot predict what
it will be.