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.devel Subject: Recommend lexical-binding in Coding Conventions Date: Tue, 20 Oct 2020 18:05:57 -0700 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000400dd405b223f367" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10661"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 21 03:06:56 2020 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 1kV2ad-0002gk-RJ for ged-emacs-devel@m.gmane-mx.org; Wed, 21 Oct 2020 03:06:55 +0200 Original-Received: from localhost ([::1]:38194 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kV2ac-0000Ny-Rd for ged-emacs-devel@m.gmane-mx.org; Tue, 20 Oct 2020 21:06:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43972) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kV2Zl-0008O7-VJ for emacs-devel@gnu.org; Tue, 20 Oct 2020 21:06:01 -0400 Original-Received: from mail-ej1-f43.google.com ([209.85.218.43]:37400) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kV2Zk-0004h7-1O for emacs-devel@gnu.org; Tue, 20 Oct 2020 21:06:01 -0400 Original-Received: by mail-ej1-f43.google.com with SMTP id e22so457098ejr.4 for ; Tue, 20 Oct 2020 18:05:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:date:message-id:subject:to; bh=jgyac89wQaGaHbpS7NN6js/+ffL0pGeJ4h1notbcWRk=; b=bf5/Mq+9xO7r9jVma6uMSHGR+18f34ntjUKgigT2NgOlDVV/gUwf6rGCDGIkuJpHop d0mHyk0RonPPkkDsj+gHMEu3GCzZ5cbVHy3KBYVrBjeolm3b/YnGK6dEgugOb8iOWC3d dCXsmy7bFeg68tnlLxhQ4OZ7SgPMl5dbHtNEaeM6AR/60lZlQdfKpLVgTP4hnR0f/wrP ZbuZWk1M0MRImdJdfu3E/G6+St4YZ9jCJsvEbKLjYicatnusMpSIr9NxuqtwjbXT72HT jUf5WZ4Q+mJD819I2OLtNvqabqrHGQYVuOVX5WDqckJB+wTv8EEDOIO/rvW+MVYHUPru BWCg== X-Gm-Message-State: AOAM531Eh0Z2p1f1qu11Yc4gkbOvXJtadCfg2fM/7n675dohK2+TZ/At j9hEvJoYekg5a7B4h6CMDBCy4WEb7+iMhhQczU8FDtrd X-Google-Smtp-Source: ABdhPJyrM7nDgBq8MPSt6KR+XbuIp1GBhNqc8CaTgo44r4uMQcxzytB0gBEe+NQwbg3uMpkxZMDDjhW0Z8bEtHfD/AU= X-Received: by 2002:a17:906:3e4b:: with SMTP id t11mr859742eji.420.1603242358203; Tue, 20 Oct 2020 18:05:58 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 20 Oct 2020 18:05:57 -0700 Received-SPF: pass client-ip=209.85.218.43; envelope-from=stefankangas@gmail.com; helo=mail-ej1-f43.google.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/20 21:05:58 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:258202 Archived-At: --000000000000400dd405b223f367 Content-Type: text/plain; charset="UTF-8" We don't currently recommend using lexical-binding in our Coding Conventions (`(elisp) Tips'). Is there some reason for that, or is it just an oversight? I would suggest to add it, and have attached a first draft for what it could look like. Thoughts? --000000000000400dd405b223f367 Content-Type: text/x-diff; charset="US-ASCII"; name="0001-Recommend-lexical-binding-in-Coding-Conventions.patch" Content-Disposition: attachment; filename="0001-Recommend-lexical-binding-in-Coding-Conventions.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: 340736d6aad10e34_0.1 RnJvbSBhMjgzNWFiMzhlZGNiZDU4M2Y4Nzk5ODgxM2ViZjM2YWJlMTEwMTY1IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBTdGVmYW4gS2FuZ2FzIDxzdGVmYW5AbWFyeGlzdC5zZT4KRGF0 ZTogV2VkLCAyMSBPY3QgMjAyMCAwMTo1MDo1MCArMDIwMApTdWJqZWN0OiBbUEFUQ0hdIFJlY29t bWVuZCBsZXhpY2FsLWJpbmRpbmcgaW4gQ29kaW5nIENvbnZlbnRpb25zCgoqIGRvYy9saXNwcmVm L3RpcHMudGV4aSAoQ29kaW5nIENvbnZlbnRpb25zLCBMaWJyYXJ5IEhlYWRlcnMpOgpSZWNvbW1l bmQgdXNpbmcgbGV4aWNhbC1iaW5kaW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