summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Templeton <bpt@hcoop.net>2010-07-22 16:33:53 -0400
committerAndy Wingo <wingo@pobox.com>2010-12-07 13:21:03 +0100
commit67cb2c27610295aa68445951c03a7550efc9453a (patch)
treeaf54b689d7b82654a85315369359d7949fb4203d
parentb41a673d2647eef7ff43469ed864bd584fcd9be2 (diff)
downloadguile-67cb2c27610295aa68445951c03a7550efc9453a.tar.gz
function's argument can be a symbol
* module/language/elisp/compile-tree-il.scm (compile-function): the form `(function SYMBOL)' evaluates to the functional value of SYMBOL Signed-off-by: Andy Wingo <wingo@pobox.com>
-rw-r--r--module/language/elisp/compile-tree-il.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/module/language/elisp/compile-tree-il.scm b/module/language/elisp/compile-tree-il.scm
index 0e4829836..773f0555b 100644
--- a/module/language/elisp/compile-tree-il.scm
+++ b/module/language/elisp/compile-tree-il.scm
@@ -823,7 +823,9 @@
(defspecial function (loc args)
(pmatch args
(((lambda ,args . ,body))
- (compile-lambda loc args body))))
+ (compile-lambda loc args body))
+ ((,sym) (guard (symbol? sym))
+ (reference-with-check loc sym function-slot))))
(defspecial defmacro (loc args)
(pmatch args