From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#9469: buffer-local variables seem to remember previous values Date: Tue, 13 Sep 2011 08:54:58 -0400 Message-ID: References: <70AD30BE45C847BE828A3E8A71280A8E@us.oracle.com> <95CFAF98BEBE4DFAB885B85F02126C57@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1315918558 20849 80.91.229.12 (13 Sep 2011 12:55:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 13 Sep 2011 12:55:58 +0000 (UTC) Cc: Lars Magne Ingebrigtsen , Andreas Schwab , 9469@debbugs.gnu.org To: Le Wang Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 13 14:55:52 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R3SWl-0004z3-6M for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Sep 2011 14:55:51 +0200 Original-Received: from localhost ([::1]:50459 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3SWk-0002vU-CL for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Sep 2011 08:55:50 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:44462) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3SWc-0002uF-AY for bug-gnu-emacs@gnu.org; Tue, 13 Sep 2011 08:55:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R3SWX-0007qD-0p for bug-gnu-emacs@gnu.org; Tue, 13 Sep 2011 08:55:42 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58167) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3SWW-0007q6-VD for bug-gnu-emacs@gnu.org; Tue, 13 Sep 2011 08:55:36 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1R3Sap-0003wO-3J; Tue, 13 Sep 2011 09:00:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Sep 2011 13:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9469 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 9469-submit@debbugs.gnu.org id=B9469.131591877115076 (code B ref 9469); Tue, 13 Sep 2011 13:00:02 +0000 Original-Received: (at 9469) by debbugs.gnu.org; 13 Sep 2011 12:59:31 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3SaI-0003v6-C0 for submit@debbugs.gnu.org; Tue, 13 Sep 2011 08:59:30 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3SaE-0003uy-Tc for 9469@debbugs.gnu.org; Tue, 13 Sep 2011 08:59:28 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EACNSb05FxK3+/2dsb2JhbABCp2d5gVMBAQQBViMFCwsOJhIUGA0kiAq4KIZuBKA3hEQ X-IronPort-AV: E=Sophos;i="4.68,374,1312171200"; d="scan'208";a="136063909" Original-Received: from 69-196-173-254.dsl.teksavvy.com (HELO ceviche.home) ([69.196.173.254]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 13 Sep 2011 08:54:59 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id BCEC4660B6; Tue, 13 Sep 2011 08:54:58 -0400 (EDT) In-Reply-To: (Le Wang's message of "Mon, 12 Sep 2011 12:39:13 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 13 Sep 2011 09:00:03 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:51094 Archived-At: > "The special form quote returns its single argument, as written, > without evaluating it. This provides a way to include constant symbols > and lists" > Isn't the first sentence misleading? It does not *always* return a > single argument as written. It does the first time, and memoizes > subsequently. Where is the mention of that? There is no memoization: the quote does not *construct* the object, it just returns it. The problem is similar/identical to what happens with immediate strings in C: char *foo (void) { char *res = "toto\n"; res[1]++; return res; } [ modern C tries to fix this problem by the use of "const char*". ] > Again, pedantically speaking, the information is there. It's just not > clear enough to prevent other people falling into this trap in the > future. I'd be happy to try and make it more clear to people who aren't familiar with it (after all, that's the main target audience here), but I'm not sure how. Do you have some suggestion about what text to use to make it clear to you? Stefan