summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Israelsson Tampe <stefan.itampe@gmail.com>2018-12-13 21:14:35 +0100
committerStefan Israelsson Tampe <stefan.itampe@gmail.com>2018-12-13 21:14:35 +0100
commit19930f72a8356dc0b9247ad633d17e506943e52e (patch)
tree35ffda4cdc011e01966388a53458c4093f7ebfc1
parentc4d7f3178bbd2d16660ff1f94961c811c9d528c3 (diff)
fix bug in guile-mod
-rw-r--r--modules/language/python/guilemod.scm51
1 files changed, 16 insertions, 35 deletions
diff --git a/modules/language/python/guilemod.scm b/modules/language/python/guilemod.scm
index c8dc413..9bcfa74 100644
--- a/modules/language/python/guilemod.scm
+++ b/modules/language/python/guilemod.scm
@@ -36,20 +36,22 @@
(define-C default-language
(lambda (file)
(define default ((C current-language)))
- (if (C *do-extension-dispatch*)
- (let ((ext (car (reverse (string-split file #\.)))))
- (let lp ((l (C *extension-dispatches*)))
- (if (pair? l)
- (if (member ext (caar l))
- (let ((r (cdar l)))
- (if ((C language?) default)
- (if (eq? ((C language-name) default) r)
- default
- r)
- r))
- (lp (cdr l)))
- default)))
- default)))
+ (pk file)
+ (pk
+ (if (C *do-extension-dispatch*)
+ (let ((ext (car (reverse (string-split file #\.)))))
+ (let lp ((l (C *extension-dispatches*)))
+ (if (pair? l)
+ (if (member ext (caar l))
+ (let ((r (cdar l)))
+ (if ((C language?) default)
+ (if (eq? ((C language-name) default) r)
+ default
+ r)
+ r))
+ (lp (cdr l)))
+ default)))
+ default))))
(define-exp-C %in-compile (make-fluid #f))
@@ -237,24 +239,3 @@
loc))
(else
(emit port "~A: `format' warning~%" loc)))))))))
-
-
-
-(define pload
- (let ((guile-load (@ (guile) primitive-load-path)))
- (lambda (p . q)
- (let lp ((l *extension-dispatches*))
- (if (pair? l)
- (let lp2 ((u (caar l)))
- (if (pair? u)
- (aif it (%search-load-path (string-append p "." (car u)))
- (apply guile-load it q)
- (lp2 (cdr u)))
- (lp (cdr l))))
- (apply guile-load p q))))))
-
-
-(define-set-G primitive-load-path pload)
-
-
-