From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eduardo Ochs Newsgroups: gmane.emacs.devel Subject: Re: Declaring 'lexical-binding: nil' obsolete Date: Sat, 25 Sep 2021 20:56:58 -0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26451"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , Emacs developers To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Sep 26 01:57:52 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mUHYG-0006gT-KO for ged-emacs-devel@m.gmane-mx.org; Sun, 26 Sep 2021 01:57:52 +0200 Original-Received: from localhost ([::1]:59310 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mUHYF-0005r6-De for ged-emacs-devel@m.gmane-mx.org; Sat, 25 Sep 2021 19:57:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54812) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUHXd-00059G-Qx for emacs-devel@gnu.org; Sat, 25 Sep 2021 19:57:13 -0400 Original-Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]:36781) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mUHXc-0006Yq-5t for emacs-devel@gnu.org; Sat, 25 Sep 2021 19:57:13 -0400 Original-Received: by mail-pl1-x635.google.com with SMTP id y5so6676451pll.3 for ; Sat, 25 Sep 2021 16:57:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KmSC6TFlavVEq63UP4wpROb/8gf8mj1BCnesr3uHCT4=; b=T0af5ws/X8clhlslYjTmvDJJR1yFtbgJrx5MenTb9dvtrPH2gJ5+qVLYYhQ6JNOywZ cWBNf5w862DXxeXAnk8r2V8iauFLOFxZ0Y0zLwt5lUJMUMSUVV6XBiIfhieg9Sh2aPTN af0ctPAJWuU2YHuYBueZDoXoWEx4JAbZRKDD7q4jtaBrg+O8qBoAPGxFt12B/5/tNysR yyI00pwFDSX0xooMVJ9h2+nBG98veo/+BN0WGas3e0V+ns8gMxNHQccygZrsvLJfhxOX V9S/rY+VhlM0dCDgfmBGQ1xzXCuB4dKlEdSFVnqUN+ONktiRfry/9nRaWZK9ejwY+Mct SqkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KmSC6TFlavVEq63UP4wpROb/8gf8mj1BCnesr3uHCT4=; b=M9vD/TmZ2xxxfjQHJG5eH2QwH40nk7gEWftWEwPS7LjTd3GU2bhRc9ZVFsd8X+pIMH 01HQrU/ezhcf3ozCQ35Guk5guRvSPu89BosvpM3PKGEGUuQHoaO+vNgvdnAEm6nkmFDV N7COMLRLY7E5ZrEyjuKBXgSFyqe+0UB+jzyizQ6uVXor+46S+rc8bSTVlinYhwTO29gm Pg96TJiPDNgO9ZM7V1Nz3CWMUZp2MeKeXWsN2ENGP1sXA5EISBUurs3TY6EtcjwICPbr eAcZxfv7IXosVxGFi2LhECUZOtOaXtF6VBIWi12LzlIbT8+2fkWVJtC+I8V4dhJq1Y9o 7AUw== X-Gm-Message-State: AOAM531hEto69zYS0qkNrGbgJwDq3aFTmN+02kR0MRMSbgDdRXiEk/WR vLWuK8s3B+Z6FmMMYVBCaR1et4hSZqLoa+FBrIK+1i3imnI= X-Google-Smtp-Source: ABdhPJzthEG/M549xnEtEnVZPChONIyD2ufyQqA3VDaWBJF4nTXiC3Dw6f+VqL4cqo90DdwrqrxPjZKREP30fOX4+qA= X-Received: by 2002:a17:902:b68b:b0:13a:1239:b8d9 with SMTP id c11-20020a170902b68b00b0013a1239b8d9mr15615934pls.25.1632614230159; Sat, 25 Sep 2021 16:57:10 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=eduardoochs@gmail.com; helo=mail-pl1-x635.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:275488 Archived-At: Let me double-check... so is it enough to add a -*- lexical-binding: nil; -*- to the end of the first line of each of our ".el" files? All the files of eev use dynamic binding... and they are also marked with "no-byte-compile: t" for reasons explained here, http://angg.twu.net/eev-intros/find-eev-install-intro.html#7.1 (find-eev-install-intro "7.1. Byte-compilation") So I don't usually see the byte-compiler warnings... [[]], Eduardo Ochs http://angg.twu.net/#eev On Sat, 25 Sept 2021 at 19:49, Stefan Kangas wrote: > > Hi all, > > Lexical binding has been with us since Emacs 24.1, released on > 2012-06-10, almost ten years ago. In Emacs 28.1, we will have no files > that do not use lexical-binding.[1] > > I think it is time to formally declare the "lexical-binding:nil" dialect > of Emacs Lisp obsolete. > > I have been thinking about what a roadmap could look like, and I would > like to propose a roadmap, best explained by this NEWS entry: > > ** 'lexical-binding: nil' is now obsolete. > The old 'lexical-binding:nil' dialect of Emacs Lisp is now obsolete. > Third-party code will need to be changed to support > 'lexical-binding:t' to run properly on Emacs in the future. > > We expect that this transition will be very smooth in most cases. > See the Info node "(elisp) Converting to Lexical Binding" in > the Emacs Lisp reference manual for some advice. > > For now, the most visible effect of this is that there is a warning > when byte-compiling a file that does not specify lexical-binding to > either nil or t. This is intended as a stop-gap, and we will > eventually warn if this variable is nil. > > The plan for phasing out 'lexical-binding:nil' is as follows: > > Emacs 28.1 - The byte-compiler warns if there is no 'lexical-binding' > cookie. > > Emacs 30.1 - The byte-compiler warns if there is no 'lexical-binding' > cookie, or if the cookie is 'lexical-binding:nil'. > > Emacs 32.1 - The warnings remain as before, and 'lexical-binding:t' is > the default. > > The version numbers in this plan could be adjusted, but the ones I > propose should already give us most of the next decade before we > actually flip the switch. In any case, whatever we decide now could > easily be adjusted in the future if needed. > > Please see the attached patch for an idea of what this obsoletion might > amount to in terms of code. It basically adds the following > byte-compiler warning: > > In toplevel form: > lisp/foobar.el: Warning: First line should contain either > "-*-lexical-binding:t-*-" or "-*-lexical-binding:nil-*-". > > Footnotes: > [1] org-agenda.el still has no cookie, but it will once the latest > version of Org-mode is merged into our tree.