summaryrefslogtreecommitdiffstats
path: root/guile.init
diff options
context:
space:
mode:
authorThomas Bushnell, BSG <tb@debian.org>2006-04-26 23:08:39 -0700
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:34 -0800
commit0aec178b52e42086df31cc52558bba0ef22b8439 (patch)
tree6e58dcbfcaf56e5d6595f5d6fb7e83810bf8d760 /guile.init
parentff9cb66fee88a090869a2fb452ad49d858fe3b0c (diff)
parent237c6e380aebdcbc70bd1c9ecf7d3f6effca2752 (diff)
downloadslib-0aec178b52e42086df31cc52558bba0ef22b8439.tar.gz
slib-0aec178b52e42086df31cc52558bba0ef22b8439.zip
Import Debian changes 3a3-1debian/3a3-1
slib (3a3-1) unstable; urgency=low * New upstream release. Change to guile.init for module correctness (from 3a2-5) is now in upstream. We'll drop the path-search misfeature at this point, and stick to upstream's version, unless this causes actual difficulties. * Makefile: Repeat $(htmldir)slib_toc.html changes from 3a2-1. * debian/postinst: Fix typos in comments. (Closes: #337571)
Diffstat (limited to 'guile.init')
-rw-r--r--guile.init35
1 files changed, 15 insertions, 20 deletions
diff --git a/guile.init b/guile.init
index 9fd36d9..76f1f0e 100644
--- a/guile.init
+++ b/guile.init
@@ -370,26 +370,21 @@
;;; (let ((load-file (guile:wrap-case-insensitive load)))
;;; (lambda (<pathname>)
;;; (load-file (string-append <pathname> (scheme-file-suffix))))))
-;; Two changes from the normal slib thing here:
-;; 1. Load from the path
-;; 2. Importantly: guarantee that loaded files land in the slib module.
-(define (slib:load name)
- (save-module-excursion
- (lambda ()
- (set-current-module slib-module)
- (let ((errinfo (catch 'system-error
- (lambda ()
- (load-from-path name)
- #f)
- (lambda args args))))
- (if (and errinfo
- (catch 'system-error
- (lambda ()
- (load-from-path
- (string-append name ".scm"))
- #f)
- (lambda args args)))
- (apply throw errinfo))))))
+(define (slib:load-helper loader)
+ (lambda (name)
+ (save-module-excursion
+ (lambda ()
+ (set-current-module slib-module)
+ (let ((errinfo (catch 'system-error
+ (lambda () (loader name) #f)
+ (lambda args args))))
+ (if (and errinfo
+ (catch 'system-error
+ (lambda () (loader (string-append name ".scm")) #f)
+ (lambda args args)))
+ (apply throw errinfo)))))))
+(define slib:load (slib:load-helper load))
+(define slib:load-from-path (slib:load-helper load-from-path))
(define slib:load-source slib:load)