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

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

quote doesn't produce a fresh object


From: Don Bashford
Subject: quote doesn't produce a fresh object
Date: 06 Jun 2004 16:47:24 -0500

(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







reply via email to

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