;; Get/create it.
(make-modules-in (current-module) full-name))))))
-;; Cheat.
+;; Cheat. These bindings are needed by modules.c, but we don't want
+;; to move their real definition here because that would be unnatural.
+;;
(define try-module-autoload #f)
+(define process-define-module #f)
+(define process-use-modules #f)
+(define module-export! #f)
;; This boots the module system. All bindings needed by modules.c
;; must have been defined by now.
(append (cadr kws) exports)))
(else
(unrecognized kws))))))
- (set-current-module module)
module))
;;; {Autoload}
(defmacro define-module args
`(eval-case
((load-toplevel)
- (process-define-module ',args))
+ (set-current-module (process-define-module ',args)))
(else
(error "define-module can only be used at the top level"))))
(module-ref the-root-module 'use-emacs-interface))
(load-emacs-interface))
- ;; Place the user in the guile-user module.
- (process-define-module
- '((guile-user)
- :use-module (guile) ;so that bindings will be checked here first
- :use-module (ice-9 session)
- :use-module (ice-9 debug)
- :autoload (ice-9 debugger) (debug))) ;load debugger on demand
- (and (provided? 'threads)
- (named-module-use! '(guile-user) '(ice-9 threads)))
- (and (provided? 'regex)
- (named-module-use! '(guile-user) '(ice-9 regex)))
-
(let ((old-handlers #f)
(signals (if (provided? 'posix)
`((,SIGINT . "User interrupt")
(define exit-hook (make-hook))
\f
-(define-module (guile))
+(append! %load-path (list "."))
+
+;; Place the user in the guile-user module.
+;;
+(define-module (guile-user)
+ :use-module (guile) ;so that bindings will be checked here first
+ :use-module (ice-9 session)
+ :use-module (ice-9 debug)
+ :autoload (ice-9 debugger) (debug)) ;load debugger on demand
-(append! %load-path (cons "." '()))
+(if (provided? 'threads)
+ (use-modules (ice-9 threads)))
+(if (provided? 'regex)
+ (use-modules (ice-9 regex)))
;;; boot-9.scm ends here