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#5371: Priority of different kind of local variable bindings Date: Wed, 13 Jan 2010 13:45:47 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1263408611 27489 80.91.229.12 (13 Jan 2010 18:50:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Jan 2010 18:50:11 +0000 (UTC) Cc: 5371@debbugs.gnu.org To: Lennart Borgman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 13 19:50:04 2010 Return-path: Envelope-to: geb-bug-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 1NV8I7-0001wH-6D for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Jan 2010 19:50:03 +0100 Original-Received: from localhost ([127.0.0.1]:60250 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NV8I8-0001DW-0m for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Jan 2010 13:50:04 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NV8Hb-000149-Th for bug-gnu-emacs@gnu.org; Wed, 13 Jan 2010 13:49:31 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NV8HX-00012N-By for bug-gnu-emacs@gnu.org; Wed, 13 Jan 2010 13:49:31 -0500 Original-Received: from [199.232.76.173] (port=44946 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NV8HX-00012K-2t for bug-gnu-emacs@gnu.org; Wed, 13 Jan 2010 13:49:27 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54055) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NV8HW-000131-MF for bug-gnu-emacs@gnu.org; Wed, 13 Jan 2010 13:49:26 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NV8EE-0006bG-Em; Wed, 13 Jan 2010 13:46:02 -0500 X-Loop: bug-gnu-emacs@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: Wed, 13 Jan 2010 18:46:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5371 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 5371-submit@debbugs.gnu.org id=B5371.126340835825364 (code B ref 5371); Wed, 13 Jan 2010 18:46:02 +0000 Original-Received: (at 5371) by debbugs.gnu.org; 13 Jan 2010 18:45:58 +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 1NV8E9-0006b3-OH for submit@debbugs.gnu.org; Wed, 13 Jan 2010 13:45:57 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NV8E6-0006as-1D for 5371@debbugs.gnu.org; Wed, 13 Jan 2010 13:45:56 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvIEAC+kTUvO+KPG/2dsb2JhbACBRNYRhDAEijI X-IronPort-AV: E=Sophos;i="4.49,269,1262581200"; d="scan'208";a="53687497" Original-Received: from 206-248-163-198.dsl.teksavvy.com (HELO pastel.home) ([206.248.163.198]) by ironport2-out.pppoe.ca with ESMTP; 13 Jan 2010 13:45:48 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 73B01806E; Wed, 13 Jan 2010 13:45:47 -0500 (EST) In-Reply-To: (Lennart Borgman's message of "Wed, 13 Jan 2010 16:50:25 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) X-Spam-Score: -2.1 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list X-Spam-Score: -2.1 (--) Resent-Date: Wed, 13 Jan 2010 13:46:02 -0500 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:34284 Archived-At: >> What do you mean by "priority of different kind of local variables"? > I just meant which value is active at a certain point. It's not based on priorities. > (with-temp-buffer > (set (make-local-variable 'temp-var) "buffer-2") > (temp-var-display "cc") > (let ((temp-var "let")) > (temp-var-display "dd") > (kill-local-variable 'temp-var) > (temp-var-display "ff")) The `let' binding affects the currently "active" slot, so in this case it affects the buffer-local slot. So after kill-local-variable, this binding is lost. Note that mixing let-binding and buffer-local bindings is generally discouraged. The only known reasonably sane semantics for such a mix is when the variable is always buffer-local. If you mix `let' with make-local-variable and kill-local-variable you're really asking for trouble. Stefan