guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 15/36: fix symbol-function


From: Christopher Allan Webber
Subject: [Guile-commits] 15/36: fix symbol-function
Date: Tue, 19 Oct 2021 18:11:25 -0400 (EDT)

cwebber pushed a commit to branch wip-elisp-rebased
in repository guile.

commit 361db0dca8eb4850bad23b71dddf120ed4772cf2
Author: Robin Templeton <robin@terpri.org>
AuthorDate: Fri Jul 18 17:43:20 2014 -0400

    fix symbol-function
    
    (Best-ability ChangeLog annotation added by Christine Lemmer-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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]