2 ms·
Not quite. lexical-binding is buffer-local, so evaling that code probably won't do what you want. Instead, put this at the top of any elisp file you want to be
by quotemstr 13y ago
Not quite. lexical-binding is buffer-local, so evaling that code probably won't do what you want. Instead, put this at the top of any elisp file you want to be interpreted with lexical scoping:
;; -*- lexical-binding: t -*-
Unfortunately, lexical-binding _must_ be optional and off by default. Old code often breaks badly when run under the new rules, mostly because people did silly things like sending out-parameters by symbol name and using add-to-list on local variables.