1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-07-07 10:00:23 +02:00

lexical function binding for elisp

* module/language/elisp/compile-tree-il.scm (access-variable)
  (reference-variable, set-variable!): Handle globally-bound non-special
  variables.

  (bind-lexically?): Create lexical bindings for flet and flet*.

* module/language/elisp/runtime.scm (reference-variable, set-variable!):
  Handle globally-bound non-special variables.

  (built-in-func): Set the variable directly instead of storing the
  function in a fluid.

* module/language/elisp/runtime/subrs.scm (funcall): Call apply
  directly.

* test-suite/tests/elisp-compiler.test ("Function Definitions")["flet
  and flet*"]:
This commit is contained in:
Brian Templeton 2010-08-16 03:20:55 -04:00
parent 761e60535b
commit c2eb58825c
4 changed files with 45 additions and 19 deletions

View file

@ -358,9 +358,8 @@
(prim apply (@ (guile) apply) real-func args))))
(built-in-func funcall
(let ((myapply (fluid-ref apply)))
(lambda (func . args)
(myapply func args))))
(lambda (func . args)
(apply func args)))
;;; Throw can be implemented as built-in function.