From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "spamfilteraccount@gmail.com" Newsgroups: gmane.emacs.help Subject: Strange incf behavior in Emacs 22. Intentional? Date: Thu, 28 Jun 2007 05:41:31 -0700 Organization: http://groups.google.com Message-ID: <1183034491.352998.214980@n2g2000hse.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1183038056 6744 80.91.229.12 (28 Jun 2007 13:40:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 28 Jun 2007 13:40:56 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 28 15:40:55 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I3uEu-0001Um-Ev for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Jun 2007 15:40:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I3uEt-0000xU-LY for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Jun 2007 09:40:51 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!n2g2000hse.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 24 Original-NNTP-Posting-Host: 194.88.55.211 Original-X-Trace: posting.google.com 1183034491 29815 127.0.0.1 (28 Jun 2007 12:41:31 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 28 Jun 2007 12:41:31 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2) Gecko/20070220 Firefox/2.0.0.2,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: n2g2000hse.googlegroups.com; posting-host=194.88.55.211; posting-account=b98TkQ0AAAD7PsllN8gfWGRoPOPWdnv4 Original-Xref: shelby.stanford.edu gnu.emacs.help:149743 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:45331 Archived-At: 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.