1 diff --git a/module/system/base/compile.scm b/module/system/base/compile.scm
2 index c110512f0..83a3b479d 100644
3 --- a/module/system/base/compile.scm
4 +++ b/module/system/base/compile.scm
6 (and (false-if-exception (ensure-directory (dirname f)))
9 +(define *do-extension-dispatch* #f)
10 +(define *extension-dispatches* '((("py") . python) (("pl") . prolog)))
12 +(define (default-language file)
13 + (define default (current-language))
14 + (if *do-extension-dispatch*
15 + (let ((ext (car (reverse (string-split file #\.)))))
16 + (let lp ((l *extension-dispatches*))
18 + (if (member ext (caar l))
20 + (if (language? default)
21 + (if (eq? (language-name default) r)
30 +(define %in-compile (make-fluid #f))
32 (define* (compile-file file #:key
34 - (from (current-language))
35 + (from (default-language file))
37 (env (default-environment from))
39 (canonicalization 'relative))
40 - (with-fluids ((%file-port-name-canonicalization canonicalization))
41 + (with-fluids ((%in-compile #t)
42 + (%file-port-name-canonicalization canonicalization))
43 (let* ((comp (or output-file (compiled-file-name file)
44 (error "failed to create path for auto-compiled file"
46 diff --git a/module/system/base/message.scm b/module/system/base/message.scm
47 index 979291c1e..c0d639235 100644
48 --- a/module/system/base/message.scm
49 +++ b/module/system/base/message.scm
51 warning-type? warning-type-name warning-type-description
52 warning-type-printer lookup-warning-type
61 (description warning-type-description)
62 (printer warning-type-printer))
64 +(define %dont-warn-list '())
65 (define %warning-types
66 ;; List of known warning types.
70 "report possibly unbound variables"
71 ,(lambda (port loc name)
72 - (emit port "~A: warning: possibly unbound variable `~A'~%"
74 + (if (not (member name %dont-warn-list))
75 + (emit port "~A: warning: possibly unbound variable `~A'~%"
78 (macro-use-before-definition
79 "report possibly mis-use of macros before they are defined"