From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Juanma Barranquero" Newsgroups: gmane.emacs.devel Subject: frame-local variables weirdness Date: Tue, 5 Dec 2006 14:41:34 +0100 Message-ID: NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1165326127 17467 80.91.229.10 (5 Dec 2006 13:42:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 5 Dec 2006 13:42:07 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 05 14:42:05 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GraYY-0007mn-4Z for ged-emacs-devel@m.gmane.org; Tue, 05 Dec 2006 14:41:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GraYX-0002Z4-Nk for ged-emacs-devel@m.gmane.org; Tue, 05 Dec 2006 08:41:57 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GraYD-0002YI-Pb for emacs-devel@gnu.org; Tue, 05 Dec 2006 08:41:37 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GraYD-0002XX-4e for emacs-devel@gnu.org; Tue, 05 Dec 2006 08:41:37 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GraYC-0002XA-II for emacs-devel@gnu.org; Tue, 05 Dec 2006 08:41:36 -0500 Original-Received: from [64.233.182.189] (helo=nf-out-0910.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GraYC-0000oo-Ju for emacs-devel@gnu.org; Tue, 05 Dec 2006 08:41:36 -0500 Original-Received: by nf-out-0910.google.com with SMTP id d4so221806nfe for ; Tue, 05 Dec 2006 05:41:35 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=t9GYXaoB8GV8t7AAw/LlPkEk7B/CP43t3VY1Tr1BITIZyRqKHB/o6AIcJsrtv2nVZImEvN1L/IIiyCx53lAxQwg0XZZso0vP091D1RWLS+BHjO5zn7Bv8rq2CmqY6gOvMk8eZ8JU+zjxlI0nnfj2Bcgfr7XY6BUSSBNANP3FAA8= Original-Received: by 10.82.113.6 with SMTP id l6mr1728099buc.1165326094778; Tue, 05 Dec 2006 05:41:34 -0800 (PST) Original-Received: by 10.82.147.2 with HTTP; Tue, 5 Dec 2006 05:41:34 -0800 (PST) Original-To: "Emacs Devel" Content-Disposition: inline X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:63315 Archived-At: After making a variable frame-local, and then buffer-local (with `make-variable-buffer-local', not `make-local-variable') it is not possible to set a buffer-local value for the variable: ELISP> (setq foo 'default) default ELISP> (make-variable-frame-local 'foo) foo ELISP> (modify-frame-parameters nil '((foo . frame))) nil ELISP> foo frame ELISP> (make-variable-buffer-local 'foo) foo ELISP> (setq foo 'bug) bug ELISP> foo bug ELISP> (frame-parameter nil 'foo) bug ELISP> (local-variable-p 'foo) nil However, that doesn't happen if we first make it buffer-local, and then frame-local: ELISP> (setq bar 'default) default ELISP> (make-variable-buffer-local 'bar) bar ELISP> (setq bar 'buffer) buffer ELISP> (local-variable-p 'bar) t ELISP> (make-variable-frame-local 'bar) bar ELISP> (modify-frame-parameters nil '((bar . frame))) nil ELISP> bar buffer ELISP> (kill-local-variable 'bar) bar ELISP> bar frame BTW, is there a way to know when a variable is frame local? `frame-parameter' is not enough (it could be a frame parameter and yet not a frame local variable). /L/e/k/t/u