Subject: RE: bug#33998: 27.0.50; cl-delete does not delete the first list element

From: Drew Adams <[email-masked]>
Date: Tue, 8 Jan 2019 10:45:50 -0800 (PST)

> > Again, you should set the variable to the value
> > returned by `cl-delete' only if that's what you
> > want
> 
> OK. Say you don't. Say you don't SETQ the variable
> to the return value. What do you expect to be left
> with in the value bound to the SEQ symbol?
> 
> > Pretty simple, really.
> 
> Then answer the pretty simple question above.

Without setting variable `seq' (i.e., without
the `setq'), that variable is still bound to
whatever it was bound to prior to your invoking
`(cl-delete thing seq)'.  Presumably it was
bound to a cons.  It is still bound to that
cons - the same (`eq') cons.

`cl-delete' is not passed the variable.  It is
passed only its value.  It can only act on that
value.  It can act on that cons.

A function can change the car or cdr of a cons.
A function cannot change which cons some variable
points to, unless the function has access to that
variable (not just its value).

Whether the car or cdr of the cons passed to
`cl-delete' is redirected, that has no effect
on which cons is the value of variable `seq'.