From b40c72b5ac0ae5d58769052b6d092449c5254852 Mon Sep 17 00:00:00 2001 From: larstvei Date: Sat, 19 Apr 2025 15:53:44 +0200 Subject: [PATCH] Lexical scoping everywhere It seems that Emacs now yields a warning when loading files without lexical binding enabled. --- init.org | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/init.org b/init.org index a1077ad..9789a69 100644 --- a/init.org +++ b/init.org @@ -120,8 +120,8 @@ #+end_src - I want lexical scoping for the init-file, which can be specified in the - header. The first line of the configuration is as follows: + I want lexical scoping for the init and early-init files, which can be + specified in the header. The first line of the configuration is as follows: #+begin_src emacs-lisp @@ -129,6 +129,12 @@ #+end_src + #+begin_src emacs-lisp :tangle early-init.el + + ;;; -*- lexical-binding: t -*- + + #+end_src + The =init.el= should (after the first run) mirror the source blocks in the =init.org=. We can use =C-c C-v t= to run =org-babel-tangle=, which extracts the code blocks from the current file into a source-specific file (in this