Subject: bug#71985: closed (Re: bug#71985: Lexical directives at start of file)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 30 Sep 2024 01:45:14 +0000

Your bug report

#71985: Lexical directives at start of file

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
71985: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71985
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#71985: Lexical directives at start of file
From: Stefan Kangas <[email-masked]>
To: Eli Zaretskii <[email-masked]>
Cc: [email-masked], Heime <[email-masked]>
Date: Sun, 29 Sep 2024 18:43:02 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

Eli Zaretskii <[email-masked]> writes:

>> Date: Mon, 08 Jul 2024 13:36:36 +0000
>> From: Heime <[email-masked]>
>> Cc: [email-masked]
>>
>>
>>
>>
>>
>>
>> Sent with Proton Mail secure email.
>>
>> On Monday, July 8th, 2024 at 1:21 PM, Eli Zaretskii <[email-masked]> wrote:
>>
>> > > Date: Mon, 08 Jul 2024 12:44:26 +0000
>> > > From: Heime [email-masked]
>> > > Cc: [email-masked]
>> > >
>> > > > > Yes about the starting ;;;. But then I have also seen additional non-directive
>> > > > > descriptions before the -- lexical-binding:t -- directive.
>> > > > >
>> > > > > As the lexical definition will be around a while, it would be good to know what
>> > > > > would be valid.
>> > > >
>> > > > Then the ELisp manual provides this information, I think.
>> > >
>> > > It could be there. But, where is it ?
>> >
>> >
>> > I told you before: in the node called "Selecting Lisp Dialect".
>>
>> Have gone through the GNU Emacs Lisp Reference Manual corresponding to
>> Emacs version 29.1.90.  There is no such node.
>
> It was added in the current release branch, and will be in Emacs 30.1.
> Meanwhile you can look at it here:
>
>   https://git.savannah.gnu.org/cgit/emacs.git/tree/doc/lispref/variables.texi?h=emacs-30#n1287

I don't see a bug here, so I'm closing this bug report.

Subject: Lexical directives at start of file
From: Heime <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Sun, 07 Jul 2024 18:45:12 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

I was curious whether the -*- lexical-binding: t -*- directive is effective 
when there is an arbitrary number of comment characters before it.

For instance, in file.el:

;;; file.el -*- lexical-binding: t -*-

This is the first line from git-rebase.el in the Magit package:

;;; git-rebase.el --- Edit Git rebase files  -*- lexical-binding:t -*-

This suggests that some characters can precede the variable list. However,
it's unclear if the number of characters can be arbitrary. I couldn't find
a clear explanation in either the Emacs or Elisp manuals. The Emacs manual 
mentions that it can be placed on the second line of a shell script, but 
doesn't provide much detail on the format. The Elisp manual does not describe 
the appearance of this directive at all.

I was wondering whether the "-*- lexical-binding: t -*-" applies when 
there is an arbitrary number of comment characters. 

;;; file.el -*- lexical-binding: t -*-

This is the first line from `git-rebase.el` from magit.

;;; git-rebase.el --- Edit Git rebase files  -*- lexical-binding:t -*-

So one can have some characters in front of the actually var list.  But not 
sure if it's arbitrary.  I don't see it mentioned anywhere in both Emacs and 
Elisp manual.  In Emacs manual, it only mentions that it can be placed on the 
second line of a shell script.  Elisp manual doesn't even mention how it should
look like.