diff options
author | BT Templeton <bpt@hcoop.net> | 2011-07-09 18:49:02 -0400 |
---|---|---|
committer | BT Templeton <bpt@hcoop.net> | 2012-02-03 18:53:49 -0500 |
commit | 03e00c5c9ddbeda56543da94601142df40e2bcbb (patch) | |
tree | a290b060f4a3b3912eda55a7e886d276fa52b94e /test-suite/tests/elisp-compiler.test | |
parent | d4cb18ad9cf09f54552d82463acf1269a11a8764 (diff) | |
download | guile-03e00c5c9ddbeda56543da94601142df40e2bcbb.tar.gz |
emacs-compatible lexical binding
* module/language/elisp/bindings.scm (global?): New function.
* module/language/elisp/compile-tree-il.scm (lexical-binding): New
variable.
(bind-lexically?): If lexical binding is enabled, bind lexically
unless a special binding exists.
(compile-%set-lexical-binding-mode): New function.
* module/language/elisp/lexer.scm (lexical-binding-regexp): New
variable.
(lex): Return a `set-lexical-binding-mode!' token if a comment is
found while reading the first line.
* module/language/elisp/parser.scm (get-expression): Add support for
`set-lexical-binding-mode!' tokens.
* module/language/elisp/runtime/function-slot.scm: Import and re-export
the `%set-lexical-binding-mode' special form.
* test-suite/tests/elisp-compiler.test
("Let and Let*")["lambda args inside lexical-let"]: Update.
Diffstat (limited to 'test-suite/tests/elisp-compiler.test')
-rw-r--r-- | test-suite/tests/elisp-compiler.test | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test-suite/tests/elisp-compiler.test b/test-suite/tests/elisp-compiler.test index ebef0c243..819884fb8 100644 --- a/test-suite/tests/elisp-compiler.test +++ b/test-suite/tests/elisp-compiler.test @@ -295,7 +295,7 @@ (defun dyna () a) (lexical-let ((a 2) (b 42)) (and (= a 2) (= (dyna) 1) - ((lambda (a) (and (= a 3) (= b 42) (= (dyna) 3))) 3) + ((lambda (a) (and (= a 3) (= b 42) (= (dyna) 1))) 3) ((lambda () (let ((a 3)) (and (= a 3) (= (dyna) 1))))) (= a 2) (= (dyna) 1))) |