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

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

Re: Strange incf behavior in Emacs 22. Intentional?


From: Lennart Borgman (gmail)
Subject: Re: Strange incf behavior in Emacs 22. Intentional?
Date: Thu, 28 Jun 2007 15:51:23 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070604 Thunderbird/2.0.0.4 Mnenhy/0.7.5.666

address@hidden wrote:
Here are two functions:

(defun testfun1 ()
  (interactive)
  (setq a '(0 0))
  (print a))

(defun testfun2 ()
  (interactive)
  (incf (car a))
  (print a))


I call the first one, a is (0 0).
I call the second one, a is (1 0).
I call the second one, a is (2 0).
I call the first one, a is (2 0).

"a" won't get the value (0 0) again until I redefine testfun1.

I suspect it is caused be some kind of internal optimization. Is it
intentional? It cost me a great deal of head scratching to find out
why my program doesn't work.


Are you using Emacs 22? Could you then please file a bug report?




reply via email to

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