From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.bugs Subject: bug#9469: buffer-local variables seem to remember previous values Date: Tue, 13 Sep 2011 22:42:34 +0200 Message-ID: References: <70AD30BE45C847BE828A3E8A71280A8E@us.oracle.com> <95CFAF98BEBE4DFAB885B85F02126C57@us.oracle.com> <87ehzktj6b.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1315946624 12607 80.91.229.12 (13 Sep 2011 20:43:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 13 Sep 2011 20:43:44 +0000 (UTC) To: 9469@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 13 22:43:39 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 1R3ZpT-0005Ks-Mc for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Sep 2011 22:43:39 +0200 Original-Received: from localhost ([::1]:36144 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3ZpS-0007vD-Px for geb-bug-gnu-emacs@m.gmane.org; Tue, 13 Sep 2011 16:43:38 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:53473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3ZpP-0007uv-CL for bug-gnu-emacs@gnu.org; Tue, 13 Sep 2011 16:43:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R3ZpO-0005Fb-E5 for bug-gnu-emacs@gnu.org; Tue, 13 Sep 2011 16:43:35 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48007) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3ZpO-0005FV-6A for bug-gnu-emacs@gnu.org; Tue, 13 Sep 2011 16:43:34 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1R3Zti-0006Ef-1C; Tue, 13 Sep 2011 16:48:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Helmut Eller 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 20:48:01 +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 X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.131594684023919 (code B ref -1); Tue, 13 Sep 2011 20:48:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Sep 2011 20:47:20 +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 1R3Zt2-0006Dk-7n for submit@debbugs.gnu.org; Tue, 13 Sep 2011 16:47:20 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3Zsy-0006Db-3U for submit@debbugs.gnu.org; Tue, 13 Sep 2011 16:47:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R3Zob-00053E-NW for submit@debbugs.gnu.org; Tue, 13 Sep 2011 16:42:46 -0400 Original-Received: from lists.gnu.org ([140.186.70.17]:42841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3Zob-000539-Ky for submit@debbugs.gnu.org; Tue, 13 Sep 2011 16:42:45 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:53308) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3Zoa-0007rt-GT for bug-gnu-emacs@gnu.org; Tue, 13 Sep 2011 16:42:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R3ZoZ-00052c-3r for bug-gnu-emacs@gnu.org; Tue, 13 Sep 2011 16:42:44 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:59830) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3ZoY-00052S-RM for bug-gnu-emacs@gnu.org; Tue, 13 Sep 2011 16:42:43 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1R3ZoV-00051T-00 for bug-gnu-emacs@gnu.org; Tue, 13 Sep 2011 22:42:39 +0200 Original-Received: from dial-176163.pool.broadband44.net ([212.46.176.163]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 13 Sep 2011 22:42:38 +0200 Original-Received: from eller.helmut by dial-176163.pool.broadband44.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 13 Sep 2011 22:42:38 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 40 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: dial-176163.pool.broadband44.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:2o2ibv2utTXMAgnqZrEk9j+qbes= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 13 Sep 2011 16:48:02 -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:51115 Archived-At: * Drew Adams [2011-09-13 18:52] writes: [...] > The Lisp reader is kind of in the background of user awareness, so the > question of where the Lisp object comes from can mistakenly be > answered by thinking that it is `quote' that creates it based on the > text/sexp that follows the '. That, I think, is the gotcha that > tripped up Le (and he's not alone). Yes, that's crucial. Beginners need to understand that read and eval are separate and what the purpose of each is: read turns text into s-expressions. eval "executes" s-expressions; eval is described in terms of s-expressions and not text. Also that the reader is not the only way to construct s-expressions for eval. [...] > Given that understanding, what can also be missing is that, depending > on the Lisp, the Lisp reader might not create a _new_ list each time > it encounters the sexp "(a b c)". And in Emacs Lisp it in fact does > not create a new list; it reuses a previously created list, if > available. (Is that always true for Elisp? What about gc?). I've never heard of a reader that does what you describe here. The reader creates a new list for "'foo" just as for "(quote foo)" or for "(bar foo)". (eq (read "'a") (read "'a")) returns nil; all the time. Just like (let ((sexp (read "('a 'a)"))) (eq (car sexp) (cadr sexp))) is always nil. The reader interns symbols but lists and vectors are freshly created (ignoring the #1# syntax for now). The compiler may coalesce constant lists that are equal; but don't let us confuse the reader with the compiler. Helmut