Enable lexical scoping

This commit is contained in:
Lars Tveito 2017-08-01 18:59:39 +02:00
parent 00a10873c8
commit db8a3ce73a

View File

@ -93,6 +93,13 @@
git update-index --no-assume-unchanged init.el git update-index --no-assume-unchanged init.el
#+END_SRC #+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:
#+BEGIN_SRC emacs-lisp
;;; -*- lexical-binding: t -*-
#+END_SRC
The =init.el= should (after the first run) mirror the source blocks in 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 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 extracts the code blocks from the current file into a source-specific
@ -198,8 +205,8 @@
which-key))) ; Display available keybindings in popup which-key))) ; Display available keybindings in popup
(ignore-errors ;; This package is only relevant for Mac OS X. (ignore-errors ;; This package is only relevant for Mac OS X.
(when (memq window-system '(mac ns)) (when (memq window-system '(mac ns))
(add-to-list 'packages 'exec-path-from-shell) (push 'exec-path-from-shell packages)
(add-to-list 'packages 'reveal-in-osx-finder 'exec-path-from-shell)) (push 'reveal-in-osx-finder packages))
(let ((packages (remove-if 'package-installed-p packages))) (let ((packages (remove-if 'package-installed-p packages)))
(when packages (when packages
;; Install uninstalled packages ;; Install uninstalled packages