From 9d88ca2d5ecb9b2bffc6094e911ff3c10e62005b Mon Sep 17 00:00:00 2001
From: Stephen Chang <stchang@ccs.neu.edu>
Date: Wed, 2 Oct 2013 15:10:18 -0400
Subject: [PATCH] fix make-base-eval in scribble/eval to check for pretty
 before attaching it

---
 pkgs/scribble-pkgs/scribble-lib/scribble/eval.rkt |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pkgs/scribble-pkgs/scribble-lib/scribble/eval.rkt b/pkgs/scribble-pkgs/scribble-lib/scribble/eval.rkt
index 6ec781b..290c359 100644
--- a/pkgs/scribble-pkgs/scribble-lib/scribble/eval.rkt
+++ b/pkgs/scribble-pkgs/scribble-lib/scribble/eval.rkt
@@ -339,7 +339,8 @@
 (define (install-pretty-printer! e ns)
   (call-in-sandbox-context e
     (lambda ()
-      (namespace-attach-module ns 'racket/pretty)
+      (unless (namespace-variable-value 'pretty-print-handler #t (lambda () #f))
+        (namespace-attach-module ns 'racket/pretty))
       (current-print (dynamic-require 'racket/pretty 'pretty-print-handler)))))
 
 (define (make-base-eval #:lang [lang '(begin)] #:pretty-print? [pretty-print? #t] . ips)
-- 
1.7.9.5

