[Top][All Lists]

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

Re: Is this a bug of Emacs-Lisp?

From: Alan Mackenzie
Subject: Re: Is this a bug of Emacs-Lisp?
Date: Fri, 17 Feb 2006 19:24:32 +0000 (GMT)


On Fri, 17 Feb 2006, Zhang Wei wrote:

>(defun dummy () '(1 . 2))

> => (1 . 2)

>(setcdr (dummy) 3)

> => (1 . 3)

>Modify the return value of dummy changed it's defination. Is this
>a bug of Elisp? If it's not. How does this happen?

No, it's not a bug at all.  You haven't changed the definition of dummy
with the setcdr - you've merely altered a cons cell which happened to
have been produced some time earlier by dummy.

Please also note that address@hidden isn't really the place for this
sort of question - it's a mailing list for discussing the development of
Emacs.  You'd do better by posting to the list <address@hidden>,
or the equivalent newsgroups, gnu.emacs.help.

>Zhang Wei or Brep

Alan Mackenzie (Munich, Germany)

reply via email to

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