From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: frame-local variables weirdness Date: Thu, 11 Oct 2007 13:33:34 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1192124045 21530 80.91.229.12 (11 Oct 2007 17:34:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 11 Oct 2007 17:34:05 +0000 (UTC) Cc: Emacs Devel To: "Juanma Barranquero" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 11 19:34:00 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ig1v6-0005tV-72 for ged-emacs-devel@m.gmane.org; Thu, 11 Oct 2007 19:34:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ig1uz-0005vd-OC for ged-emacs-devel@m.gmane.org; Thu, 11 Oct 2007 13:33:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ig1ux-0005vC-7A for emacs-devel@gnu.org; Thu, 11 Oct 2007 13:33:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ig1uv-0005uo-Oa for emacs-devel@gnu.org; Thu, 11 Oct 2007 13:33:50 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ig1uv-0005ul-MA for emacs-devel@gnu.org; Thu, 11 Oct 2007 13:33:49 -0400 Original-Received: from x-132-204-254-24.xtpr.umontreal.ca ([132.204.254.24] helo=ceviche.home) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ig1ur-0002da-CZ for emacs-devel@gnu.org; Thu, 11 Oct 2007 13:33:49 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 6F1B3B41BB; Thu, 11 Oct 2007 13:33:34 -0400 (EDT) In-Reply-To: (Juanma Barranquero's message of "Thu\, 11 Oct 2007 16\:37\:34 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) 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:80637 Archived-At: >> I'd much rather disallow variables that are both buffer-local and >> frame-local. > I think the problem is between frame-local and automatically > buffer-local variables, not just buffer-local ones. I suggest to disallow mixing even with the weaker "buffer-local" flavor. >> What is the use-case? > I don't have a use case, and I don't really care one way or the other, > but they have been documented to work for a long time. From > "Frame-Local Variables": > Buffer-local bindings take precedence over frame-local bindings. > Thus, consider a variable `foo': if the current buffer has a > buffer-local binding for `foo', that binding is active; otherwise, if > the selected frame has a frame-local binding for `foo', that binding is > active; otherwise, the default binding of `foo' is active. > And they do work, if swap_in_symval_forwarding is not called before > `make-variable-buffer-local'. > How do you propose disallowing them? By fixing the documentation, or > are you saying that setting a variable to be both will throw an error? Signal an error when calling make-local-variable or make-variable-buffer-local if the variable is already frame-local, and signal an error in make-variable-frame-local if the variable has already been made buffer-local. Stefan "who'd even go as far as removing the notion of frame-local variables: the few uses of them could call frame-parameter explicitly just as easily"