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

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

bug#5971: 23.1.95; `delete' modifies default value instead of buffer-loc


From: Drew Adams
Subject: bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value
Date: Sun, 18 Apr 2010 22:24:42 -0700

> > This doesn't seem right to me.
>  
> Why not?  That's the whole reason for the existence of two functions:
> `delete' and `remove'.

I'm aware that `delete' modifies the list structure and `remove' uses a copy.
What I don't understand is the interaction with a default value instead of a
buffer-local value. Why would `delete' cause the behavior described?

The same code BTW uses `nconc' apparently without causing such
modify-the-default-value behavior:

(setq wide-n-restrictions
      (nconc (nthcdr arg wide-n-restrictions) latest))

What is the relation between `delete's modification of the list structure of a
cons that is a buffer-local value of a variable and its (apparent) modification
of the default value of the variable?








reply via email to

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