[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Strange incf behavior in Emacs 22. Intentional?
From: |
Juanma Barranquero |
Subject: |
Re: Strange incf behavior in Emacs 22. Intentional? |
Date: |
Thu, 28 Jun 2007 15:54:05 +0200 |
On 6/28/07, spamfilteraccount@gmail.com
(defun testfun1 ()
(interactive)
(setq a '(0 0))
(print a))
The expresion '(0 0) builds a list when you're defining testfun1. That
list is being modified by testfun2().
If you use
(setq a (list 0 0))
you build a new list every time that testfun1 is executed.
Take a look at the Emacs Lisp Introduction and the Emacs Lisp
Reference; they're bundled with Emacs 22 (C-h I to access the Info
Directory).
Juanma