all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#71985: Lexical directives at start of file
@ 2024-07-07 18:45 Heime via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-07-07 19:02 ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Heime via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-07-07 18:45 UTC (permalink / raw)
  To: 71985

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.





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-09-30  1:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-07 18:45 bug#71985: Lexical directives at start of file Heime via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-07 19:02 ` 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.