From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#14939: 24.3.50; `make-variable-frame-local' deprecation - alternative? Date: Tue, 23 Jul 2013 19:04:23 +0200 Message-ID: References: <9c76d260-9793-4ed4-a3b5-fc9aca408034@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1374599168 12337 80.91.229.3 (23 Jul 2013 17:06:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Jul 2013 17:06:08 +0000 (UTC) Cc: 14939@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 23 19:06:09 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V1g2K-0008Oe-Ln for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Jul 2013 19:06:08 +0200 Original-Received: from localhost ([::1]:37794 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1g2J-0007Xy-KU for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Jul 2013 13:06:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55228) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1g2F-0007Xp-Lq for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2013 13:06:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1g2E-0006X6-CX for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2013 13:06:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50874) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1g2E-0006Wz-8e for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2013 13:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1V1g2D-0002Em-OO for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2013 13:06:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juanma Barranquero Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Jul 2013 17:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14939 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14939-submit@debbugs.gnu.org id=B14939.13745991158483 (code B ref 14939); Tue, 23 Jul 2013 17:06:01 +0000 Original-Received: (at 14939) by debbugs.gnu.org; 23 Jul 2013 17:05:15 +0000 Original-Received: from localhost ([127.0.0.1]:45185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V1g1R-0002Cg-Ir for submit@debbugs.gnu.org; Tue, 23 Jul 2013 13:05:14 -0400 Original-Received: from mail-ea0-f170.google.com ([209.85.215.170]:39814) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V1g1O-0002CB-FU for 14939@debbugs.gnu.org; Tue, 23 Jul 2013 13:05:11 -0400 Original-Received: by mail-ea0-f170.google.com with SMTP id h10so4611168eaj.15 for <14939@debbugs.gnu.org>; Tue, 23 Jul 2013 10:05:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=7G4fOo/MPX9Gv4aDB0cz1NxUccl7wZpjcKS6lNQsOZc=; b=x7orNVrBtHpFZxN9ww0Te0vUEoPLOSlwJoJYY5uATeuIVVNWSiD86Jr3nlJg458Ktk wyWTB8LoyUPcm+bAt2jcZxNHrgoBA2QY1y32Xfq/hRuBs3l2O07TSsqbV4g8a+3ICeg7 O7zhTyNuGWSqDSLJ7aouNjYTfiVMjehfVNKKAMXzEKCOm46IaaSqpO5voXHzUhX5VdQ3 U2jqJ4hxeyO62aGM+brBq6gM9heYUel0Qwma2Df0UpFLYfz35RwTFH3f+lAMSauLTAP+ lxzPkf1qaKIeUeiN0Lusj+z1TtKzTe9o3YdqkLyGM5KXbu7+HqWT4EiDjoE40RxKWO5J crfA== X-Received: by 10.14.219.6 with SMTP id l6mr32704109eep.152.1374599104545; Tue, 23 Jul 2013 10:05:04 -0700 (PDT) Original-Received: by 10.14.142.4 with HTTP; Tue, 23 Jul 2013 10:04:23 -0700 (PDT) In-Reply-To: <9c76d260-9793-4ed4-a3b5-fc9aca408034@default> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:76603 Archived-At: On Tue, Jul 23, 2013 at 5:51 PM, Drew Adams wrote: > If I remove the call to `make-variable-frame-local' then > the code no longer works - the frame parameter value is not used as > the variable value in code that tests the variable value. > > Is each piece of code that uses the value of the variable supposed to > check the selected frame to see if it has a parameter, and if so, to use > that frame parameter value instead of the variable value? That would be > ridiculously heavy-handed. And still, yes. Basically, if you want to store info in a frame parameter and then use it at some other place, you should explicitly do so. The old method of allowing a third type of "automatic" variable, along global and buffer-local ones, adds complexity, had obscure non-trivial bugs and it was, in fact, almost never used. The very fact that they've been deprecated for six years and nobody has complained surely says something... > Please advise. Is this just a problem of unclear doc (it does not > reallyh tell you what to do in place of using > `make-variable-frame-local')? Or is the deprecation of this function > misguided, because there is no good replacement for it? Likely you don't really use that many frame-local variables. You can easily write a couple of macros or functions to set and check the value of one variable taking into account the possible existence of a frame-local version (as a frame parameter). Isn't that convenient as the old method? No, but it won't bite you unexpectedly, and would be clearer for anyone reading the code. Juanma