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#66636: Move lexical-binding warning from checkdoc to byte-compiler Date: Thu, 19 Oct 2023 10:40:31 -0700 Message-ID: References: <48764CD1-C80F-4613-9848-BD8CA9203A40@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7757"; mail-complaints-to="usenet@ciao.gmane.io" To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , 66636@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 19 19:41:53 2023 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 1qtX1s-0001lW-9x for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 Oct 2023 19:41:52 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtX1e-0008LE-H5; Thu, 19 Oct 2023 13:41:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qtX1b-0008AA-Kx for bug-gnu-emacs@gnu.org; Thu, 19 Oct 2023 13:41:35 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtX1b-0001LX-8Q for bug-gnu-emacs@gnu.org; Thu, 19 Oct 2023 13:41:35 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qtX21-00045i-Ku for bug-gnu-emacs@gnu.org; Thu, 19 Oct 2023 13:42:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Oct 2023 17:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66636 X-GNU-PR-Package: emacs Original-Received: via spool by 66636-submit@debbugs.gnu.org id=B66636.169773726715643 (code B ref 66636); Thu, 19 Oct 2023 17:42:01 +0000 Original-Received: (at 66636) by debbugs.gnu.org; 19 Oct 2023 17:41:07 +0000 Original-Received: from localhost ([127.0.0.1]:37718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtX19-00044F-IO for submit@debbugs.gnu.org; Thu, 19 Oct 2023 13:41:07 -0400 Original-Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]:43421) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtX17-00043a-Aj for 66636@debbugs.gnu.org; Thu, 19 Oct 2023 13:41:06 -0400 Original-Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2c51682fddeso11941681fa.1 for <66636@debbugs.gnu.org>; Thu, 19 Oct 2023 10:40:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697737232; x=1698342032; darn=debbugs.gnu.org; h=content-transfer-encoding:to:subject:message-id:date:mime-version :references:in-reply-to:from:from:to:cc:subject:date:message-id :reply-to; bh=SvHkYJfqCupUH72oU6KcVJjKDrZGKR6ukBktisbQm4E=; b=aMOmBCrGUNXHqqfcMR/Ws27vq4bsNFfwi+izOjG+EsdT9pXVL8kPXMpGlylIQITc1+ gTvJ/kW4j88c4u6KUWn+JPvrqV7U5wm+CqKhaVTV3s4DjaS+H5FvZS53WjPMvWFx90Pg X4fuC02HwgZ2TDyyPvFO7U0L2ESj00+CqGSUc/raSukMckmLcDP3RRKT3RH9EGg1oT9K BkdjkrR05+0g96SP9S17hF6tBmFmi7EcoIT9+z6hHt0wrz2zfrSorBbZt4elgZGrC797 eljoFwK+rvbdkMEbP+qG7+3TrtNlsxKX5QeOTEX4++ERvzC9M1z14fIh6HHB+508W7J4 q66Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697737232; x=1698342032; h=content-transfer-encoding:to:subject:message-id:date:mime-version :references:in-reply-to:from:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=SvHkYJfqCupUH72oU6KcVJjKDrZGKR6ukBktisbQm4E=; b=w0ssa5KE5flCAuHdof98J4T7R1NzXcGvEVMoDtzHXL9e3TtSjwjQwEZwSCCyThwSc6 NHY/WNi3A9kpbvyDzUIr1SzMEnHepjWpQcMTAEZtX5J9YonCILcVoGdszCHvaDrTgFsG mSplWPquSdniBrMlPS5eu7MNngB6e2QGd2RJ+34V71fWHTK52b7lqOGUKy/dmjBmttTy IGfkHZVoJDoQ1U9ccVT+TiV3WsyZqDxW/HoPKG/dnb2V3Wv1jSALhyJ4Wb5R9KpTrtkM QM1k/pqK+TeOOwOHAlgqr36PSdpBtP2CPN5Y9+y4vWy1eaC2x/hWjejqifLR6ESQo8UJ G1oA== X-Gm-Message-State: AOJu0YwnrD4MYwopZExp7OJddZS/srO70Q699W5UziSvbYNwjpLNCnAU mi/3jpo2BIDqsBrSxS1C3Huzsrq3re8WLMy6DbQ= X-Google-Smtp-Source: AGHT+IH06Nz9WJGYnTsyouxWvJBqTfOB7UEEf0CylJrofk7nRyRlasLiPqPn1Dn6ShnlFQJHUjwz2CLANWiPrQJaQi0= X-Received: by 2002:a19:ac4c:0:b0:503:2567:c42f with SMTP id r12-20020a19ac4c000000b005032567c42fmr804072lfc.0.1697737232154; Thu, 19 Oct 2023 10:40:32 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 19 Oct 2023 10:40:31 -0700 In-Reply-To: <48764CD1-C80F-4613-9848-BD8CA9203A40@gmail.com> 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:272751 Archived-At: Mattias Engdeg=C3=A5rd writes: > The warning about a missing lexical-binding cookie rather belongs in > the compiler than checkdoc, because it's not about documentation or > style but code generation and ability to detect errors, both which are > hindered by a missing cookie. > > Moving the warning to the compiler also makes it more widely seen. Yes, that makes much more sense. Thanks for doing that. The patch looks good too. > + ;;; My little pony mode -*- lexical-binding: t -*- If we want this to conform with the format required by package.el, this should be: ;;; pony.el --- My little pony mode -*- lexical-binding: t -*- Or would that distract from the main point? > +Lexical binding avoids some name conflicts and allows the compiler > +to detect more mistakes and generate more efficient code. On a side note, it would be good to also highlight this in the relevant sections of the manual.