3 ms·
FYI, emacs lisp already does have lexical scope. It is optional, as I understand it. Not sure how you choose to use it.
by wging 13y ago
FYI, emacs lisp already does have lexical scope. It is optional, as I understand it. Not sure how you choose to use it.
- agumonkey 13y ago(setq lexical-binding t)
- quotemstr 13y agoNot 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.