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: Re: frame-local variables weirdness Date: Fri, 8 Dec 2006 03:28:17 +0100 Message-ID: References: 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 1165544921 7750 80.91.229.10 (8 Dec 2006 02:28:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 8 Dec 2006 02:28:41 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 08 03:28:39 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 1GsVTU-0001M5-PJ for ged-emacs-devel@m.gmane.org; Fri, 08 Dec 2006 03:28:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GsVTU-0002xw-8e for ged-emacs-devel@m.gmane.org; Thu, 07 Dec 2006 21:28:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GsVTK-0002vZ-8E for emacs-devel@gnu.org; Thu, 07 Dec 2006 21:28:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GsVTH-0002qA-Cc for emacs-devel@gnu.org; Thu, 07 Dec 2006 21:28:21 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GsVTH-0002pu-4F for emacs-devel@gnu.org; Thu, 07 Dec 2006 21:28:19 -0500 Original-Received: from [66.249.92.169] (helo=ug-out-1314.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GsVTH-0005mh-2y for emacs-devel@gnu.org; Thu, 07 Dec 2006 21:28:19 -0500 Original-Received: by ug-out-1314.google.com with SMTP id j3so740716ugf for ; Thu, 07 Dec 2006 18:28:18 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Wgl78gLRDblG/WttjVuxeavusMyXwdDHaJgfNGj7w4ffGVNsOa00nvBlwmNXf75qMC2ccBDORhPXTSfmCv3m/bIcKh75iYCIBAUeIQdpVp2BRuVjhfujjQFf8ButNEhh6AIlxjiLUfUEXIt3YYqWNzzgNwdEYrycuuNEJYpiq7Y= Original-Received: by 10.82.179.9 with SMTP id b9mr282943buf.1165544897707; Thu, 07 Dec 2006 18:28:17 -0800 (PST) Original-Received: by 10.82.146.7 with HTTP; Thu, 7 Dec 2006 18:28:17 -0800 (PST) Original-To: "Emacs Devel" In-Reply-To: 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:63442 Archived-At: I've simplified the test. Apparently, getting the value of a frame-local variable negatively affects whether the variable will afterwards be able to turn automatically buffer-local. (defun test (sym bug) (set sym 'default) (make-variable-frame-local sym) (modify-frame-parameters nil (list (cons sym 'frame))) (when bug ;; Getting the value of sym changes the result (symbol-value sym)) (make-variable-buffer-local sym) (set sym 'local) (list (local-variable-p sym) ;; should be t (symbol-value sym) ;; should be 'local (frame-parameter nil sym))) ;; should be 'frame Note that passing t to the BUG argument only changes one thing: that (symbol-value sym) is run. (test 'foo nil) => (t local frame) (test 'bar t) => (nil local local) BTW, is there any easy way to remove a frame parameter? Testing this bug is a PITA because you've got to use different symbols each time... /L/e/k/t/u