summaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
authorRobin Templeton <robin@terpri.org>2014-07-18 17:43:20 -0400
committerRicardo Wurmus <rekado@elephly.net>2020-04-04 16:24:21 +0200
commite2eb15bc37a5e036a9f50ea218b618cfad12d565 (patch)
tree921af8981de2c679f63b5bf801fd742e6509da00 /module
parent2149ab67fdc4891092408dead74b402ca2135b4c (diff)
fix symbol-function
(Best-ability ChangeLog annotation added by Christopher Allan Webber.) * module/language/elisp/runtime.scm (symbol-function): Adjust function.
Diffstat (limited to 'module')
-rw-r--r--module/language/elisp/runtime.scm8
1 files changed, 4 insertions, 4 deletions
diff --git a/module/language/elisp/runtime.scm b/module/language/elisp/runtime.scm
index e4bd0ffb2..dba2a5476 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))