From: Heime via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 71985@debbugs.gnu.org
Subject: bug#71985: Lexical directives at start of file
Date: Sun, 07 Jul 2024 18:45:12 +0000 [thread overview]
Message-ID: <jcVQtVNMvpj2UcGKEith76YWADrlTTV40mSY5Vo9uDu65SMUWjzcqNyHWE-3uSwkH4BHM7835dIG5cfhVcnb19UB3fbNpJCqUOR1AS4Vlgk=@protonmail.com> (raw)
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.
next reply other threads:[~2024-07-07 18:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-07 18:45 Heime via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-07-07 19:02 ` bug#71985: Lexical directives at start of file Eli Zaretskii
2024-07-07 19:19 ` Heime via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-08 2:27 ` Eli Zaretskii
2024-07-08 12:44 ` Heime via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-08 13:21 ` Eli Zaretskii
2024-07-08 13:36 ` Heime via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-08 14:16 ` Eli Zaretskii
2024-09-30 1:43 ` Stefan Kangas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='jcVQtVNMvpj2UcGKEith76YWADrlTTV40mSY5Vo9uDu65SMUWjzcqNyHWE-3uSwkH4BHM7835dIG5cfhVcnb19UB3fbNpJCqUOR1AS4Vlgk=@protonmail.com' \
--to=bug-gnu-emacs@gnu.org \
--cc=71985@debbugs.gnu.org \
--cc=heimeborgia@protonmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).