all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Mattias Engdegård" <mattias.engdegard@gmail.com>
Cc: luangruo@yahoo.com, emacs-devel@gnu.org
Subject: Re: missing lexical-binding cookie warning when loading .el files
Date: Sat, 04 May 2024 15:59:24 +0300	[thread overview]
Message-ID: <86msp5g2c3.fsf@gnu.org> (raw)
In-Reply-To: <94A5D0EC-A261-4440-B080-5028EEC72950@gmail.com> (message from Mattias Engdegård on Sat, 4 May 2024 12:31:38 +0200)

> From: Mattias Engdegård <mattias.engdegard@gmail.com>
> Date: Sat, 4 May 2024 12:31:38 +0200
> Cc: luangruo@yahoo.com,
>  emacs-devel@gnu.org
> 
> 4 maj 2024 kl. 11.24 skrev Eli Zaretskii <eliz@gnu.org>:
> 
> >  . it hard-codes ".emacs" as the file for which we don't warn, thus
> >    leaving the warning in effect for early-init files
> >  . the init file can be named init.el or _emacs (with or without
> >    .el), and the change doesn't handle that
> 
> Actually it hard-codes .emacs as a file for which we do warn, but I didn't think of _emacs -- sorry.
> 
> Anyway, my assumption was that we should warn about the user init file(s) and you seem to disagree. Here is my reasoning:
> 
> + Init files often contain substantial amounts of hand-written code for which lexical-binding matters.
> + New Emacs-generated init files always include a lexical cookie.
> - Old Emacs-generated init files did not include a lexical cookie when created.
> - Some init files don't contain much actual Lisp code.
> 
> Not sure what the balance is. Which would you prefer, and why? I'm not deeply invested in either choice.

I'd like to hear from others as well, so let's give them some time to
chime in.

My current personal opinion is that we should move in small steps
here: first warn only about Lisp packages, which means exempt all the
user init files, as well as files not ending in ".el".

Not sure what this means for files that user init files load via an
explicit 'load' call -- how many people split their init files into
several portions, and also call those portions SOMETHING.el?  If in
doubt, we could suppress the warning for the entire duration of
startup--load-user-init-file.



  reply	other threads:[~2024-05-04 12:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-03 17:28 missing lexical-binding cookie warning when loading .el files Mattias Engdegård
2024-05-03 17:59 ` Eli Zaretskii
2024-05-03 19:41   ` Mattias Engdegård
2024-05-04  3:41     ` Po Lu
2024-05-04  4:18       ` Po Lu
2024-05-04  4:40         ` Po Lu
2024-05-04  7:32           ` Eli Zaretskii
2024-05-04  8:10             ` Po Lu
2024-05-04  8:19               ` Eli Zaretskii
2024-05-04  8:23                 ` Po Lu
2024-05-04  9:05                   ` Eli Zaretskii
2024-05-04  9:22                     ` Po Lu
2024-05-04  9:24                     ` Eli Zaretskii
2024-05-04 10:31                       ` Mattias Engdegård
2024-05-04 12:59                         ` Eli Zaretskii [this message]
2024-05-04 16:22                           ` Mattias Engdegård
2024-05-05 14:13                             ` Mattias Engdegård
2024-05-05 14:28                               ` Arsen Arsenović
2024-05-05 14:58                                 ` Mattias Engdegård
2024-05-05 16:22                                   ` [External] : " Drew Adams
2024-05-05 14:44                               ` Po Lu
2024-05-04  9:47             ` Mattias Engdegård
2024-05-04 10:01               ` Po Lu
2024-05-04 16:54               ` [External] : " Drew Adams

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86msp5g2c3.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=luangruo@yahoo.com \
    --cc=mattias.engdegard@gmail.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 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.