all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Tassilo Horn'" <tassilo@member.fsf.org>, <emacs-devel@gnu.org>
Subject: RE: How to debug modification to a variable value?
Date: Mon, 25 Jan 2010 13:08:54 -0800	[thread overview]
Message-ID: <9131EBDDBDBF4BC384201871CA79A2BE@us.oracle.com> (raw)
In-Reply-To: <87636pvrdj.fsf@thinkpad.tsdh.de>

> 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	other threads:[~2010-01-25 21:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-25 20:52 How to debug modification to a variable value? Tassilo Horn
2010-01-25 21:08 ` Drew Adams [this message]
2010-01-26  8:00   ` Tassilo Horn
2010-01-26 15:17     ` Stefan Monnier
2010-01-26 16:49       ` Richard Stallman
2010-01-26 21:02         ` Stefan Monnier
2010-01-26 18:02       ` alin.s
2010-01-27  7:37     ` Andreas Roehler
2010-01-27  8:24       ` Tassilo Horn
2010-01-27  8:51         ` Andreas Roehler
2010-01-25 22:30 ` Davis Herring
2010-01-26  8:43   ` Tassilo Horn
2010-01-26 21:04     ` Davis Herring
2010-01-27  7:50       ` Tassilo Horn
2010-01-27 15:42         ` Davis Herring
2010-01-26 15:52 ` alin.s
2010-01-26 20:26   ` Tassilo Horn
2010-01-27  8:13     ` alin.s

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9131EBDDBDBF4BC384201871CA79A2BE@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=tassilo@member.fsf.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.