-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Add missing lexical binding cookies #16960
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing lexical binding cookies #16960
Conversation
For most files lexical-binding: t should also work without changes. But for each file, someone would need examine it and check whether dynamic binding is relied on somewhere. Hence I went with the current default of lexical-binding: nil for now to pacify the warnings in Emacs 31.
|
With this version, the only warning I'm now getting is from |
Consider reporting upstream? |
@korayal Thanks for testing! Until this is fixed upstream, you could try something like the following in (advice-add
'company-statistics--load :around
(lambda (orig-fun)
(let ((warning-inhibit-types '((files missing-lexbind-cookie))))
(funcall orig-fun)))) |
|
@fnussbaum that works perfectly, thanks! |
I upgraded to the latest Emacs today, and saw warnings about the lack
of a lexical-binding cookie in these files. After a bit of reading,
it looks like lexical-binding is where Elisp is going and probably
harmless, so I've decied to enable it here.
Refs:
- https://lists.gnu.org/r/emacs-devel/2024-05/msg00250.html
- magit/magit#5361
- syl20bnr/spacemacs#16960
- https://www.emacswiki.org/emacs/DynamicBindingVsLexicalBinding
I upgraded to the latest Emacs today, and saw warnings about the lack
of a lexical-binding cookie in these files. After a bit of reading,
it looks like lexical-binding is where Elisp is going and probably
harmless, so I've decied to enable it here.
Refs:
- https://lists.gnu.org/r/emacs-devel/2024-05/msg00250.html
- magit/magit#5361
- syl20bnr/spacemacs#16960
- https://www.emacswiki.org/emacs/DynamicBindingVsLexicalBinding
* Enable lexical binding for some files * Disable lexical binding for remaining files missing declaration For most files lexical-binding: t should also work without changes. But for each file, someone would need examine it and check whether dynamic binding is relied on somewhere. Hence I went with the current default of lexical-binding: nil for now to pacify the warnings in Emacs 31. * [core] Enable lexical binding in spacemacs/dump-vars-to-file
Addresses #16959.
For most files
lexical-binding: tshould also work without changes. But for each file, someone would need examine it and check whether dynamic binding is relied on somewhere. Hence I went with the current default oflexical-binding: nilfor most files for now to pacify the warnings in Emacs 31.