cwebber pushed a commit to branch wip-elisp-rebased
in repository guile.
commit 9af414ebb0c403eb371ce0e20007af5ee3f78e1a
Author: Robin Templeton <[email protected]>
AuthorDate: Fri Jul 18 17:43:20 2014 -0400
fix symbol-function
(Best-ability ChangeLog annotation added by Christopher Allan Webber.)
* module/language/elisp/runtime.scm (symbol-function): Adjust function.
---
module/language/elisp/runtime.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/module/language/elisp/runtime.scm
b/module/language/elisp/runtime.scm
index e4bd0ff..dba2a54 100644
--- a/module/language/elisp/runtime.scm
+++ b/module/language/elisp/runtime.scm
@@ -158,10 +158,10 @@
value)
(define (symbol-function symbol)
- (set! symbol (schemify symbol))
- (ensure-present! function-slot-module symbol (lambda () #nil))
- (let ((module function-slot-module))
- (module-ref module symbol)))
+ (cond
+ ((module-variable function-slot-module (schemify symbol))
+ => variable-ref)
+ (else #nil)))
(define (set-symbol-function! symbol value)
(set! symbol (schemify symbol))