From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#44854: [PATCH] Add lexical-binding cookie to autoload files Date: Tue, 24 Nov 2020 13:35:22 -0800 Message-ID: References: <837dqatsjd.fsf@gnu.org> <83360ytqk3.fsf@gnu.org> 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="10614"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44854@debbugs.gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 24 22:36:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1khfys-0002eT-6k for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 Nov 2020 22:36:10 +0100 Original-Received: from localhost ([::1]:34608 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khfyr-0005dP-6a for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 Nov 2020 16:36:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khfyk-0005br-7W for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2020 16:36:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49978) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1khfyk-0006QP-0n for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2020 16:36:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1khfyj-0003k5-VN for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2020 16:36:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Nov 2020 21:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44854 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 44854-submit@debbugs.gnu.org id=B44854.160625373114348 (code B ref 44854); Tue, 24 Nov 2020 21:36:01 +0000 Original-Received: (at 44854) by debbugs.gnu.org; 24 Nov 2020 21:35:31 +0000 Original-Received: from localhost ([127.0.0.1]:33291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khfyE-0003jM-TY for submit@debbugs.gnu.org; Tue, 24 Nov 2020 16:35:31 -0500 Original-Received: from mail-ej1-f41.google.com ([209.85.218.41]:40324) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khfyD-0003j8-3O for 44854@debbugs.gnu.org; Tue, 24 Nov 2020 16:35:29 -0500 Original-Received: by mail-ej1-f41.google.com with SMTP id oq3so43757ejb.7 for <44854@debbugs.gnu.org>; Tue, 24 Nov 2020 13:35:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=0Z23nt5EBSxqkhpJZe9J9PwMrOS/PM4ATj4kMyMxmC0=; b=S2zyVyUuG2Cd6hOKowxNoYdiU4SE+phlsy+RwoYFNmhbk8XfxyQJg9Sd7g7eCKn0Ic GRmbnHZF1h4Cb2TYAUUhVWXFsOtUkcl6JNY3UgM5xZJHO8FwtkEUPvu2PhCb0T4hx1mz EDjbD/A2yTIBIenMM5iSoKBNidUl+6y8IjVhRWzWta6xzo6yh6fgHody11UYRVlP4nwR lvU/h4znWAywvOz6rt4WLV5wa4D5QMyb/q8xEipFAUkfonvrP3buTK7mX0rvdWQooDgT vWOCIw8ZxudpzaykVtbOp32v+G5BjPqgSbY5TnquYWxU2JG6A/75x4/gzFEa78wBRnqd NjhQ== X-Gm-Message-State: AOAM532iQwum8nlj0HL7WbbibNho8i1+bsPd8CZv0iz3BCK2Mk2FVPxG nV5zpOLiD5lM88+isFf6PO9fL+AcYCiLCB+kLaM= X-Google-Smtp-Source: ABdhPJxo6j2vM6dVKK6PL0AAPZvvGzTus2X/Ta3MSWekE9qAgx9HY2sh5XtuZBYBUqtsVwK8RASDSbxnrO0MNQZJKHg= X-Received: by 2002:a17:906:4e90:: with SMTP id v16mr354638eju.477.1606253723178; Tue, 24 Nov 2020 13:35:23 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 24 Nov 2020 13:35:22 -0800 In-Reply-To: <83360ytqk3.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:194132 Archived-At: Eli Zaretskii writes: > I guess I'm asking how is this a step on that journey. Can you > elaborate? [ In the interest of full disclosure, I had a brief private discussion with Stefan M about this. I can only speak for myself, but I will share my clarified thinking based on his input. ] I believe that if we want to have lexical-binding by default, we will at some point need to begin issuing byte-compiler warnings for files that do not explicitly say one of "-*- lexical-binding:t -*- or "-*- lexical-binding:nil -*-". This warning would need to be there for a period of time likely to be at least as long as the time span we usually allow before removing any obsolete feature. Probably even longer. Only after such a time period with the warning can we think about using "lexical-binding:t" as the default. At that point, any library that has not yet been converted will hopefully use "lexical-binding:nil". Now, the above idea would involve changing all of our own files to use one of the above. Possibly proposing this change in this manner is putting the horse ahead of the cart. But I was still undecided on whether or not this was worth bringing up for general discussion on emacs-devel for Emacs 28. This just seemed like a small and hopefully uncontroversial step, along the lines of: "there is no reason to not use "lexical-binding:t" in these files, so we might as well add it now, which will make the transition easier in the future". I would be interested in hearing what you think about the above.