diff --git a/collects/scribble/html/lang.rkt b/collects/scribble/html/lang.rkt
index 258dd15f..3caefb4a 100644
--- a/collects/scribble/html/lang.rkt
+++ b/collects/scribble/html/lang.rkt
@@ -1,20 +1,13 @@
#lang racket/base
-(require "main.rkt" scribble/text/lang scribble/text/syntax-utils
- (for-syntax racket/base))
+(require "main.rkt" (except-in scribble/text/lang #%top)
+ scribble/text/syntax-utils)
-(provide (except-out (all-from-out scribble/text/lang) #%top #%module-begin)
- (rename-out [top #%top] [module-begin #%module-begin])
+(provide (except-out (all-from-out scribble/text/lang) #%module-begin)
+ (rename-out [module-begin #%module-begin])
(all-from-out "main.rkt"))
-(define-syntax (top stx)
- (syntax-case stx ()
- [(_ . x)
- (let ([x* (syntax-e #'x)])
- (if (and (symbol? x*) (regexp-match? #rx":$" (symbol->string x*)))
- #''x
- #'(#%top . x)))]))
-
+(require (for-syntax racket/base))
(define-syntax-rule (module-begin expr ...)
(#%plain-module-begin
(port-count-lines! (current-output-port))
diff --git a/collects/scribble/html/main.rkt b/collects/scribble/html/main.rkt
index 0ab3b2aa..789c4fe3 100644
--- a/collects/scribble/html/main.rkt
+++ b/collects/scribble/html/main.rkt
@@ -4,4 +4,14 @@
;; includes all of the scribble/text utilities
scribble/text)
-(provide (all-from-out "xml.rkt" "html.rkt" "resource.rkt" scribble/text))
+(provide (all-from-out "xml.rkt" "html.rkt" "resource.rkt" scribble/text)
+ (rename-out [top #%top]))
+
+(require (for-syntax racket/base))
+(define-syntax (top stx)
+ (syntax-case stx ()
+ [(_ . x)
+ (let ([x* (syntax-e #'x)])
+ (if (and (symbol? x*) (regexp-match? #rx":$" (symbol->string x*)))
+ #''x
+ #'(#%top . x)))]))