GNU bug report logs - #5971
23.1.95; `delete' modifies default value instead of buffer-local value

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Mon, 19 Apr 2010 02:43:02 UTC

Severity: minor

Tags: notabug, wontfix

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Stefan Monnier'" <monnier <at> iro.umontreal.ca>
Cc: 5971 <at> debbugs.gnu.org
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?






This bug report was last modified 13 years and 321 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.