This file is indexed.

/usr/share/doc/racket/drracket/extending-drracket.html is in racket-doc 6.1-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>4&nbsp;Extending DrRacket</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_0&quot;);">&#9660;</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">Dr<span class="mywbr"> &nbsp;</span>Racket:<span class="mywbr"> &nbsp;</span> The Racket Programming Environment</a></td></tr></table></div><div class="tocviewsublisttop" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1&nbsp;</td><td><a href="interface-essentials.html" class="tocviewlink" data-pltdoc="x">Interface Essentials</a></td></tr><tr><td align="right">2&nbsp;</td><td><a href="languages.html" class="tocviewlink" data-pltdoc="x">Languages</a></td></tr><tr><td align="right">3&nbsp;</td><td><a href="Interface_Reference.html" class="tocviewlink" data-pltdoc="x">Interface Reference</a></td></tr><tr><td align="right">4&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">Extending Dr<span class="mywbr"> &nbsp;</span>Racket</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_1&quot;);">&#9658;</a></td><td>4&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">Extending Dr<span class="mywbr"> &nbsp;</span>Racket</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">4.1&nbsp;</td><td><a href="#%28part._teachpacks%29" class="tocviewlink" data-pltdoc="x">Teachpacks</a></td></tr><tr><td align="right">4.2&nbsp;</td><td><a href="#%28part._environment-variables%29" class="tocviewlink" data-pltdoc="x">Environment Variables</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">4.1<tt>&nbsp;</tt></span><a href="#%28part._teachpacks%29" class="tocsubseclink" data-pltdoc="x">Teachpacks</a></td></tr><tr><td><span class="tocsublinknumber">4.1.1<tt>&nbsp;</tt></span><a href="#%28part._.Adding_.Your_.Own_.Teachpacks_to_the_.Teachpack_.Dialog%29" class="tocsubseclink" data-pltdoc="x">Adding Your Own Teachpacks to the Teachpack Dialog</a></td></tr><tr><td><span class="tocsublinknumber">4.2<tt>&nbsp;</tt></span><a href="#%28part._environment-variables%29" class="tocsubseclink" data-pltdoc="x">Environment Variables</a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.1&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.1&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="drracket-files.html" title="backward to &quot;3.4 DrRacket Files&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="index.html" title="up to &quot;DrRacket: The Racket Programming Environment&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="doc-index.html" title="forward to &quot;Index&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div><h3 x-source-module="(lib &quot;scribblings/drracket/drracket.scrbl&quot;)" x-part-tag="&quot;extending-drracket&quot;">4<tt>&nbsp;</tt><a name="(part._extending-drracket)"></a>Extending DrRacket</h3><p>DrRacket supports two forms of extension to the programming
 environment:</p><ul><li><p><a name="(idx._(gentag._408._(lib._scribblings/drracket/drracket..scrbl)))"></a><a name="(idx._(gentag._409._(lib._scribblings/drracket/drracket..scrbl)))"></a>A <a name="(tech._teachpack)"></a><span style="font-style: italic">teachpack</span> extends the set of procedures
that are built into a language in DrRacket.  For example, a
teachpack might extend the Beginning Student language with a
procedure for playing sounds.</p><p>Teachpacks are particularly useful in a classroom setting, where an
instructor can provide a teachpack that is designed for a specific
exercise. To use the teachpack, each student must download the
teachpack file and select it through the <span class="ssansserif">Language|Add
  Teachpack...</span>  menu item.</p><p>See <a href="#%28part._teachpacks%29" data-pltdoc="x">Teachpacks</a> for information in creating teachpacks.</p></li><li><p>A <a name="(tech._plugin)"></a><span style="font-style: italic">plugin</span> extends the set of utilities within the
DrRacket environment. For example, DrRacket&rsquo;s <span class="ssansserif">Check
Syntax</span> button starts a syntax-checking plugin. For information on
creating <a href="#%28tech._plugin%29" class="techoutside" data-pltdoc="x"><span class="techinside">plugin</span></a>s, see <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=tools&amp;rel=index.html&amp;version=6.1" class="Sq" data-pltdoc="x">DrRacket Plugins</a>.</p></li></ul><h4 x-source-module="(lib &quot;scribblings/drracket/drracket.scrbl&quot;)" x-part-tag="&quot;teachpacks&quot;">4.1<tt>&nbsp;</tt><a name="(part._teachpacks)"></a>Teachpacks</h4><p>Teachpacks are designed to supplement student programs with code that
cannot be expressed in a teaching language. For
example, to enable students to play hangman, we supply a teachpack that</p><ul><li><p>implements the random choosing of a word,</p></li><li><p>maintains the state variable of how many guesses have gone wrong, and</p></li><li><p>manages the GUI.</p></li></ul><p>All these tasks are beyond students in the third week and/or impose
memorization of currently useless knowledge on students. The essence
of the hangman game, however, is not. The use of teachpacks enables
the students to implement the interesting part of this exercise and
still be able to enjoy today&rsquo;s graphics without the useless
memorization.</p><p>A single Racket source file defines a teachpack (although the file may
access other files via <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span>). The file must contain a
module (see <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=guide&amp;rel=modules.html&amp;version=6.1" class="Sq" data-pltdoc="x">Modules</a>). Each exported syntax definition or value definition from
the module is provided as a new primitive form or primitive operation
to the user, respectively.</p><p>As an example, the following teachpack provides a lazy cons
implementation. To test it, save the following in a file and
add the file as a teachpack (or use <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span>).</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=guide&amp;rel=Module_Syntax.html%23%2528part._hash-lang%2529&amp;version=6.1" class="RktModLink Sq" data-pltdoc="x"><span class="RktMod">#lang</span></a><span class="hspace">&nbsp;</span><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=index.html&amp;version=6.1" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">racket</span></a></td></tr><tr><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._provide%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x">provide</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._rename-out%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x">rename-out</a></span><span class="hspace">&nbsp;</span><span class="RktPn">[</span><span class="RktSym">:lcons</span><span class="hspace">&nbsp;</span><span class="RktSym">lcons</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym">lcar</span><span class="hspace">&nbsp;</span><span class="RktSym">lcdr</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=define-struct.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define-struct%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x">define-struct</a></span><span class="hspace">&nbsp;</span><span class="RktSym">lcons</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">hd</span><span class="hspace">&nbsp;</span><span class="RktSym">tl</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define-syntax%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x">define-syntax</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">:lcons</span><span class="hspace">&nbsp;</span><span class="RktSym">stx</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._syntax-case%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x">syntax-case</a></span><span class="hspace">&nbsp;</span><span class="RktSym">stx</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace">&nbsp;</span><span class="RktSym">hd-exp</span><span class="hspace">&nbsp;</span><span class="RktSym">tl-exp</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">make-lcons</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=Delayed_Evaluation.html%23%2528form._%2528%2528lib._racket%252Fpromise..rkt%2529._delay%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x">delay</a></span><span class="hspace">&nbsp;</span><span class="RktSym">hd-exp</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=Delayed_Evaluation.html%23%2528form._%2528%2528lib._racket%252Fpromise..rkt%2529._delay%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x">delay</a></span><span class="hspace">&nbsp;</span><span class="RktSym">tl-exp</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">lcar</span><span class="hspace">&nbsp;</span><span class="RktSym">lcons</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=Delayed_Evaluation.html%23%2528def._%2528%2528lib._racket%252Fpromise..rkt%2529._force%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">force</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">lcons-hd</span><span class="hspace">&nbsp;</span><span class="RktSym">lcons</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">lcdr</span><span class="hspace">&nbsp;</span><span class="RktSym">lcons</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=Delayed_Evaluation.html%23%2528def._%2528%2528lib._racket%252Fpromise..rkt%2529._force%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">force</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">lcons-tl</span><span class="hspace">&nbsp;</span><span class="RktSym">lcons</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Then, in this program:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">lmap</span><span class="hspace">&nbsp;</span><span class="RktSym">f</span><span class="hspace">&nbsp;</span><span class="RktSym">l</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym">lcons</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym">f</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">lcar</span><span class="hspace">&nbsp;</span><span class="RktSym">l</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym">lmap</span><span class="hspace">&nbsp;</span><span class="RktSym">f</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">lcdr</span><span class="hspace">&nbsp;</span><span class="RktSym">l</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">all-nums</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">lcons</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">lmap</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._add1%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">add1</a></span><span class="hspace">&nbsp;</span><span class="RktSym">all-nums</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><p>the list <span class="RktSym">all-nums</span> is bound to an infinite list
 of ascending numbers.</p><p>For more examples, see the <span class="stt">"htdp"</span> sub-collection in the
<span class="stt">"teachpack"</span> collection of the PLT installation.</p><h5 x-source-module="(lib &quot;scribblings/drracket/drracket.scrbl&quot;)" x-part-tag="&quot;Adding_Your_Own_Teachpacks_to_the_Teachpack_Dialog&quot;">4.1.1<tt>&nbsp;</tt><a name="(part._.Adding_.Your_.Own_.Teachpacks_to_the_.Teachpack_.Dialog)"></a>Adding Your Own Teachpacks to the Teachpack Dialog</h5><p>The <span class="ssansserif">Language|Add Teachpack...</span> dialog is extensible
in two ways. First, users can add teachpacks to the third column
by clicking the button at the bottom of the column. These additions
are stored in the preferences file, so one way to add site-specific
teachpacks is to provide a default preferences file.</p><p>The first two columns are also extensible. When a collection has
an <span class="stt">"info.rkt"</span> file
(see <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=raco&amp;rel=info_rkt.html&amp;version=6.1" class="Sq" data-pltdoc="x"><span class="stt">"info.rkt"</span> File Format</a>)
that defines <span class="RktSym">htdp-teachpacks</span> or <span class="RktSym">2htdp-teachpacks</span>,
then they are expected to be either a list of (collection-relative)
paths containing teachpacks to add to the dialog, or the symbol
<span class="RktVal">'</span><span class="RktVal">all</span>, which means that all of the (top-level) files in the collection
that end with <span class="stt">".rkt"</span>, <span class="stt">".ss"</span>, or <span class="stt">".scm"</span>
are teachpacks (except <span class="stt">"info.rkt"</span> or <span class="stt">"info.ss"</span>).</p><h4 x-source-module="(lib &quot;scribblings/drracket/drracket.scrbl&quot;)" x-part-tag="&quot;environment-variables&quot;">4.2<tt>&nbsp;</tt><a name="(part._environment-variables)"></a>Environment Variables</h4><p>Several environment variables can affect DrRacket&rsquo;s behavior:</p><ul><li><p><a name="(idx._(gentag._410._(lib._scribblings/drracket/drracket..scrbl)))"></a><span class="stt">PLTNOTOOLS</span> : When this environment variable is
set, DrRacket doesn&rsquo;t load any tools.</p></li><li><p><a name="(idx._(gentag._411._(lib._scribblings/drracket/drracket..scrbl)))"></a><span class="stt">PLTONLYTOOL</span> : When this environment variable
is set, DrRacket only loads the tools in the collection named
by the value of the environment variable. If the variable is
bound to a parenthesized list of collections, only the tools in
those collections are loaded (The contents of the environment
variable are <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=Reading.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._read%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">read</a></span> and expected to be a single symbol
or a list of symbols).</p></li><li><p><a name="(idx._(gentag._412._(lib._scribblings/drracket/drracket..scrbl)))"></a><span class="stt">PLTDRREPL</span> : When this environment variable is
 set, DrRacket starts a read-eval-print loop with all of
 the forms and functions from the <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=index.html&amp;version=6.1" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">racket</span></a>
 module and those described in <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=tools&amp;rel=index.html&amp;version=6.1" class="Sq" data-pltdoc="x">DrRacket Plugins</a>.</p><p>If it is not set to <span class="RktInBG"><span class="hspace"></span><span class="RktIn">-q</span><span class="hspace"></span></span>, then <span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=Filesystem.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._find-system-path%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">init-file</span><span class="RktPn">)</span>
 is loaded as well.</p><p>A new thread is created to evaluate REPL expressions, so be
 sure to use <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=gui&amp;rel=Windowing_Functions.html%23%2528def._%2528%2528lib._mred%252Fmain..rkt%2529._queue-callback%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">queue-callback</a></span> to evaluate expressions
 that mutate the GUI (to avoid race-conditions).</p></li><li><p><a name="(idx._(gentag._413._(lib._scribblings/drracket/drracket..scrbl)))"></a><span class="stt">PLTDRCM</span> : When this environment variable is
set, DrRacket installs the compilation manager before starting
up, which means that the <span class="stt">".zo"</span> files are automatically
kept up to date, as DrRacket&rsquo;s (or a tool&rsquo;s) source is modified.</p><p>If the variable is set to <span class="RktInBG"><span class="hspace"></span><span class="RktIn">trace</span><span class="hspace"></span></span> then the files that are
actually recompiled are shown.</p></li><li><p><a name="(idx._(gentag._414._(lib._scribblings/drracket/drracket..scrbl)))"></a><span class="stt">PLTDRPAR</span> : When this environment variable is
set, DrRacket uses <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=raco&amp;rel=make.html%23%2528def._%2528%2528lib._setup%252Fparallel-build..rkt%2529._parallel-compile-files%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">parallel-compile-files</a></span> to compile
the framework and the drracket collections in parallel and then
installs the compilation manager before starting
up, which means that the <span class="stt">".zo"</span> files are automatically
kept up to date, as DrRacket&rsquo;s (or a tool&rsquo;s) source is modified.</p><p>If the variable is set to <span class="RktInBG"><span class="hspace"></span><span class="RktIn">trace</span><span class="hspace"></span></span> then the files that are
actually recompiled are shown.</p></li><li><p><a name="(idx._(gentag._415._(lib._scribblings/drracket/drracket..scrbl)))"></a><span class="stt">PLTDRDEBUG</span> : When this environment variable is
set, DrRacket starts up with errortrace enabled. If the
variable is set to <span class="RktInBG"><span class="hspace"></span><span class="RktIn">profile</span><span class="hspace"></span></span>, DrRacket also records
profiling information about itself.</p></li><li><p><a name="(idx._(gentag._416._(lib._scribblings/drracket/drracket..scrbl)))"></a><span class="stt">PLTDRPROFILE</span> : When this environment variable is
set, DrRacket uses the <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=profile&amp;rel=index.html%23%2528mod-path._profile%2529&amp;version=6.1" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">profile</span></a> library (with
a little GUI) to collect profiling information about itself.</p></li><li><p><a name="(idx._(gentag._417._(lib._scribblings/drracket/drracket..scrbl)))"></a><span class="stt">PLTDRBREAK</span> : When this environment variable is
set, DrRacket creates a window with a break button, during
startup. Clicking the button breaks DrRacket&rsquo;s eventspace&rsquo;s
main thread. This works well in combination with
<span class="stt">PLTDRDEBUG</span> since the source locations are reported for
the breaks.</p></li><li><p><a name="(idx._(gentag._418._(lib._scribblings/drracket/drracket..scrbl)))"></a><span class="stt">PLTSTRINGCONSTANTS</span> : When this environment
variable is set, DrRacket prints out the string constants that
have not yet been translated. If it is set to a particular
language (corresponding to one of the files in
<span class="stt">"string-constants"</span> collection) it only shows the unset
string constants matching that language.</p><p>This environment variable must be set when <span class="stt">".zo"</span> files
are made. To ensure that you see its output properly, run
<span class="stt">setup-plt</span> with the <span class="nobreak"><span class="stt">-c</span></span> flag, set the environment
variable, and then run <span class="stt">setup-plt</span> again.</p></li><li><p><a name="(idx._(gentag._419._(lib._scribblings/drracket/drracket..scrbl)))"></a><span class="stt">PLTDRXREFDELAY</span> : When this environment variable
 is set, DrRacket uses an ordinary <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=Delayed_Evaluation.html%23%2528form._%2528%2528lib._racket%252Fpromise..rkt%2529._delay%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x">delay</a></span> (instead of
 <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=Delayed_Evaluation.html%23%2528form._%2528%2528lib._racket%252Fpromise..rkt%2529._delay%252Fidle%2529%2529&amp;version=6.1" class="RktStxLink Sq" data-pltdoc="x">delay/idle</a></span>) to delay the computation of the searching
 indices. This means that Check Syntax will start more slowly
 the first time, but that the startup performance is more
 predictable. In addition, when the environment variable is
 set, DrRacket will print out that it is set, and will print
 when the index is started loading and when it finishes loading.</p></li><li><p><a name="(idx._(gentag._420._(lib._scribblings/drracket/drracket..scrbl)))"></a><span class="stt">PLTDREASTERSECONDS</span> : When this environment variable
 is set, DrRacket pretends that the result of <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&amp;rel=time.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._current-seconds%2529%2529&amp;version=6.1" class="RktValLink Sq" data-pltdoc="x">current-seconds</a></span>
 is actually this environment variable&rsquo;s value, for the purposes
 of easter eggs. For example, setting it to 1339390801 would simulate
 King Kamehameha day 2012 and show the corresponding easter egg splash
 screen.</p></li></ul><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.1&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.1&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="drracket-files.html" title="backward to &quot;3.4 DrRacket Files&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="index.html" title="up to &quot;DrRacket: The Racket Programming Environment&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="doc-index.html" title="forward to &quot;Index&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div></div></div><div id="contextindicator">&nbsp;</div></body></html>