GNU bug report logs - #66636
Move lexical-binding warning from checkdoc to byte-compiler

Previous Next

Package: emacs;

Reported by: Mattias Engdegård <mattias.engdegard <at> gmail.com>

Date: Thu, 19 Oct 2023 11:50:01 UTC

Severity: normal

Done: Mattias Engdegård <mattias.engdegard <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 66636 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Mattias Engdegård <mattias.engdegard <at> gmail.com>, 
 66636 <at> debbugs.gnu.org
Subject: Re: bug#66636: Move lexical-binding warning from checkdoc to
 byte-compiler
Date: Thu, 19 Oct 2023 10:40:31 -0700
Mattias Engdegård <mattias.engdegard <at> gmail.com> 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.




This bug report was last modified 1 year and 272 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.