From: Don Bashford <Don.Bashford@stjude.org>
Cc: Donald Bashford <Don.Bashford@stjude.org>
Subject: quote doesn't produce a fresh object
Date: 06 Jun 2004 16:47:24 -0500 [thread overview]
Message-ID: <1086558449.12866.2576.camel@hc-dbashfor.stjude.org> (raw)
(defun myfun (x)
(let ((xs '(nil)))
(print xs)
(setcar xs "foo"))
t)
On first invocation, (myfun 'arg) prints (nil) and returns t, as
expected. But on second invocation, it prints ("foo"). It seems in the
second invocation, the let variable xs gets the old object from the
previous invocation. If '(nil) is changed to (list nil) in myfun, the
problem does not occur, so the problem is with quote, not with let.
GNU Emacs 21.2.1 (i386-redhat-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2002-04-08 on porky.devel.redhat.com
(Also occurs with 21.3 from redhat)
-Don
next reply other threads:[~2004-06-06 21:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-06 21:47 Don Bashford [this message]
2004-06-08 17:12 ` quote doesn't produce a fresh object Kevin Rodgers
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=1086558449.12866.2576.camel@hc-dbashfor.stjude.org \
--to=don.bashford@stjude.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.