emacs-devel
[Top][All Lists]
Advanced

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

RE: How to debug modification to a variable value?


From: Drew Adams
Subject: RE: How to debug modification to a variable value?
Date: Mon, 25 Jan 2010 13:08:54 -0800

> I also removed all destructive
> function calls in there, although it operates only on a list 
> created by `mapcar', and that's a copy anyway, right?

It's a top-level copy only. That is, each element in the original list is
processed by the function arg, and the results are consed up to produce a new
list.

If, for example, the original list elements are themselves lists, then,
depending on the function that is passed to mapcar, the original elements or
parts of them might well be included as elements of the final list, and their
own list structure might have been modified by the function arg.

The only new conses you can be sure about are those created by mapcar itself, as
it conses up the results. Take a close look at the function you pass to mapcar.
If it is destructive, then that could be where your problem lies.





reply via email to

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