racket/enter: fix for `enter!' related to submodules

The load handler didn't obey the protocol with respect to a second
argument that is a list starting with #f.

Closes PR 13096
This commit is contained in:
Matthew Flatt 2013-02-10 05:51:57 -07:00
parent f1e7051652
commit 2fc7cad446
2 changed files with 8 additions and 2 deletions

View File

@ -64,7 +64,9 @@
(eprintf " [~aloading ~a]\n" (if re? "re-" "") path)) (eprintf " [~aloading ~a]\n" (if re? "re-" "") path))
void)) void))
(lambda (path name) (lambda (path name)
(if name (if (and name
(not (and (pair? name)
(not (car name)))))
;; Module load: ;; Module load:
(let* ([code (get-module-code (let* ([code (get-module-code
path "compiled" path "compiled"
@ -87,7 +89,7 @@
;; Evaluate the module: ;; Evaluate the module:
(parameterize ([current-module-declare-source actual-path]) (parameterize ([current-module-declare-source actual-path])
(eval code))) (eval code)))
;; Not a module: ;; Not a module, or a submodule that we shouldn't load from source:
(begin (notify path) (orig path name))))) (begin (notify path) (orig path name)))))
(define (get-timestamp path) (define (get-timestamp path)

View File

@ -0,0 +1,4 @@
#lang racket
(require racket/enter)
(enter! slideshow/pict)