[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is this a bug of Emacs-Lisp?
From: |
Luc Teirlinck |
Subject: |
Re: Is this a bug of Emacs-Lisp? |
Date: |
Fri, 17 Feb 2006 12:18:58 -0600 (CST) |
Zhang Wei wrote:
Modify the return value of dummy changed it's defination. Is this
a bug of Elisp? If it's not. How does this happen?
>From my previous reply:
If a function returns a quoted cons, then after you change the cdr of
the cons, it still returns that (now changed) cons.
More precisely: you change the actual cons stored in the function cell
of the symbol `dummy'. The function returns that stored cons each
time it is called. To make it return a new cons each time, make it
return (cons 1 2).
Sincerely,
Luc.
- Is this a bug of Emacs-Lisp?, Zhang Wei, 2006/02/17
- Re: Is this a bug of Emacs-Lisp?, David Kastrup, 2006/02/17
- Re: Is this a bug of Emacs-Lisp?, Kevin Rodgers, 2006/02/17
- Re: Is this a bug of Emacs-Lisp?, Giorgos Keramidas, 2006/02/17
- Re: Is this a bug of Emacs-Lisp?, Andreas Schwab, 2006/02/17
- Re: Is this a bug of Emacs-Lisp?, Luc Teirlinck, 2006/02/17
- Re: Is this a bug of Emacs-Lisp?,
Luc Teirlinck <=
- Re: Is this a bug of Emacs-Lisp?, Alan Mackenzie, 2006/02/17
- Re: Is this a bug of Emacs-Lisp?, Sascha Wilde, 2006/02/17
- Re: Is this a bug of Emacs-Lisp?, Richard M. Stallman, 2006/02/18