zoliky · 2022-07-29 16:16
Hello,
This may sound silly but does this declaration `-*- lexical-binding: t; -*-` enable the lexical binding at the buffer level? From what I read it is always good to include these in the `init.el` and `early-init.el` files in the header. Is that true?
nv-elisp · 2022-07-29 16:47
Please try to research your question before asking others for help.
https://www.gnu.org/software/emacs/manual/html_node/elisp/Using-Lexical-Binding.html
zoliky · 2022-07-29 16:50
Sorry I checked but I still don't get its purpose.
nv-elisp · 2022-07-29 17:04
https://www.gnu.org/software/emacs/manual/html_node/elisp/Lexical-Binding.html
http://www.catb.org/~esr/faqs/smart-questions.html
cazzipropri · 2022-07-29 18:36
Not that you are wrong, but I wouldn't want to hire someone that behaves like you.
Given that the answer is literally in the first line of the documentation, you shouldn't assume that OP is lazy. You should rather assume that he doesn't have the emacs terminology to see that the answer is right there.
Which is why he's asking the question.
Reposting the same link again is going out of your way to be mean.
cazzipropri · 2022-07-29 18:42
Yes, the lexical binding variable is per-buffer, and the dash-star-dash line you reported is a "file local variable specification" that sets it.
Yes it's a good idea to have lexical binding on, as broadly as possible, unless you have old elisp code that relies on the old behavior.
zoliky · 2022-07-29 18:44
Thank you.
nv-elisp · 2022-07-29 18:48
> Not that you are wrong, but I wouldn't want to hire someone that behaves like you.
Behaves how? By politely pointing someone to documentation instead of spoon feeding them an incomplete answer (as you have)?
I wouldn't want to work for someone who gets offended on the behalf of others, so don't worry.
> Reposting the same link again is going out of your way to be mean.
It's not the same link. Those are two different sections of the manual concerning lexical binding. "Using Lexical Binding" vs "Lexical Binding".
itistheblurstoftimes · 2022-07-30 00:02
Can't we all just agree that nv-elisp is both helpful and an asshole and move on with the day? I mean, the guy is helpful. Who cares if he is an asshole?
nv-elisp · 2022-07-30 03:45
I don't recall ever having been an asshole to you. Have I been?
In fact, I think I recall going out of my way to warn you that rot13 was not a secure way to obscure client information in your publicly posted email screenshots.
itistheblurstoftimes · 2022-07-30 11:33
It was a joke.
nv-elisp · 2022-07-30 19:39
Apologies. It's hard to pick up on the tone when I'm getting shit on for pointing people to documentation.