From 2d364b5c899a163106f9703ca703862a455b8c3b Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 20 Apr 2021 16:24:06 -0500 Subject: Advise setup to use lexical-binding --- init.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index d3a4111..d073708 100644 --- a/init.el +++ b/init.el @@ -19,6 +19,14 @@ ;; Let's use lexical binding by default, shall we? (setq-default lexical-binding t) +;; For some reason, the above setting doesn't translate to the *scratch* +;; buffer, where I try out packages. +(advice-add 'setup :around + (defun acdw/setup-lexical-advice (orig-fun &rest args) + "Wrap `setup' in a `lexical-binding' form." + (let ((lexical-binding t)) + (apply orig-fun args)))) + ;;; Necessary packages @@ -371,7 +379,7 @@ t))) -;; Applications +;;; Applications (setup (:straight (org :host nil :repo "https://code.orgmode.org/bzg/org-mode.git")) -- cgit 1.4.1-21-gabe81