aboutsummaryrefslogtreecommitdiff
path: root/scheme/idest/list-modules.scm
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2017-01-30 08:25:42 +0200
committerSergey Poznyakoff <gray@gnu.org>2017-01-30 08:25:42 +0200
commit9a286d24b51ab106db6fe389767d79d3f5dea159 (patch)
treeedcf4a61cc076a57bc35a84703abe3d0344db95e /scheme/idest/list-modules.scm
parent7e8606f27404fe8da3051f90eadef4076f2f7a08 (diff)
downloadidest-9a286d24b51ab106db6fe389767d79d3f5dea159.tar.gz
idest-9a286d24b51ab106db6fe389767d79d3f5dea159.tar.bz2
Minor scheme fixes.
* scheme/dry-run.scm: Mention a bug in Guile 2.0.9 that causes %load-hook to be called twice. * scheme/idest/list-modules.scm: Improve error handling. * tests/script05.at: Remove the "loading" diagnostics from the output. * tests/script08.at: Likewise.
Diffstat (limited to 'scheme/idest/list-modules.scm')
-rw-r--r--scheme/idest/list-modules.scm42
1 files changed, 27 insertions, 15 deletions
diff --git a/scheme/idest/list-modules.scm b/scheme/idest/list-modules.scm
index 880dbf8..facc54b 100644
--- a/scheme/idest/list-modules.scm
+++ b/scheme/idest/list-modules.scm
@@ -99,27 +99,39 @@
(set! %load-hook #f)
(for-each
(lambda (candidate)
- (catch 'misc-error
+ (catch #t
(lambda ()
(let ((mod (resolve-module
(list 'idest type
(string->symbol (car candidate))))))
; Check if it defines idest-main
- (module-ref mod 'idest-main)
- ; Print module name
- (display (car candidate))
- ; Its directory, if required
- (if print-dir
- (format #t " (~A)" (cdr candidate)))
- ; A colon, and description (if any)
- (format #t ": ~A~%"
- (catch #t
- (lambda ()
- (module-ref mod 'description))
- (lambda (key . args)
- "no description")))))
+ (catch #t
+ (lambda ()
+ (module-ref mod 'idest-main)
+ ; Print module name
+ (display (car candidate))
+ ; Its directory, if required
+ (if print-dir
+ (format #t " (~A)" (cdr candidate)))
+ ; A colon, and description (if any)
+ (format #t ": ~A~%"
+ (catch #t
+ (lambda ()
+ (module-ref mod 'description))
+ (lambda (key . args)
+ "no description"))))
+ (lambda (key . args)
+ #f))))
+
(lambda (key . args)
- #f)))
+ (with-output-to-port
+ (current-error-port)
+ (lambda ()
+ (format #t "~A: " progname)
+ (apply format #t (list-ref args 1) (list-ref args 2))
+ (format #t ", while loading ~A/~A.scm" (cdr candidate)
+ (car candidate))
+ (newline))))))
candidates)
(newline)
(set! %load-hook saved-load-hook))))

Return to:

Send suggestions and report system problems to the System administrator.