emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/geiser-guile 6ff9936 052/284: They say call/cc is slow in


From: Philip Kaludercic
Subject: [nongnu] elpa/geiser-guile 6ff9936 052/284: They say call/cc is slow in Guile.
Date: Sun, 1 Aug 2021 18:29:14 -0400 (EDT)

branch: elpa/geiser-guile
commit 6ff99367a56fc4ee6b8f9d3ab9906efc45d91937
Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
Commit: Jose Antonio Ortega Ruiz <jao@gnu.org>

    They say call/cc is slow in Guile.
---
 geiser/modules.scm | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/geiser/modules.scm b/geiser/modules.scm
index 13a1cdd..0afb8fd 100644
--- a/geiser/modules.scm
+++ b/geiser/modules.scm
@@ -37,13 +37,16 @@
 
 (define (symbol-module sym)
   (and sym
-       (call/cc
-        (lambda (k)
-          (apropos-fold (lambda (module name var init)
-                          (if (eq? name sym) (k (module-name module)) init))
-                        #f
-                        (regexp-quote (symbol->string sym))
-                        (apropos-fold-accessible (current-module)))))))
+       (catch 'module-name
+         (lambda ()
+           (apropos-fold (lambda (module name var init)
+                           (if (eq? name sym)
+                               (throw 'module-name (module-name module)) init))
+                         #f
+                         (regexp-quote (symbol->string sym))
+                         (apropos-fold-accessible (current-module))))
+         (lambda (key . args)
+           (and (eq? key 'module-name) (car args))))))
 
 (define (module-location name)
   (make-location (module-filename name) #f))



reply via email to

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