| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | 
|---|
| 2 | <html> | 
|---|
| 3 |  | 
|---|
| 4 | <head> | 
|---|
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> | 
|---|
| 6 | <title>EDITOR-HINTS.NAMED-READTABLES - 0.9</title><style type="text/css"> | 
|---|
| 7 | pre { padding:5px; background-color:#e0e0e0 } | 
|---|
| 8 | h3, h4 { text-decoration: underline; } | 
|---|
| 9 | a { text-decoration: none; padding: 1px 2px 1px 2px; } | 
|---|
| 10 | a:visited { text-decoration: none; padding: 1px 2px 1px 2px; } | 
|---|
| 11 | a:hover { text-decoration: none; padding: 1px 1px 1px 1px; border: 1px solid #000000; } | 
|---|
| 12 | a:focus { text-decoration: none; padding: 1px 2px 1px 2px; border: none; } | 
|---|
| 13 | a.none { text-decoration: none; padding: 0; } | 
|---|
| 14 | a.none:visited { text-decoration: none; padding: 0; } | 
|---|
| 15 | a.none:hover { text-decoration: none; border: none; padding: 0; } | 
|---|
| 16 | a.none:focus { text-decoration: none; border: none; padding: 0; } | 
|---|
| 17 | a.noborder { text-decoration: none; padding: 0; } | 
|---|
| 18 | a.noborder:visited { text-decoration: none; padding: 0; } | 
|---|
| 19 | a.noborder:hover { text-decoration: none; border: none; padding: 0; } | 
|---|
| 20 | a.noborder:focus { text-decoration: none; border: none; padding: 0; } | 
|---|
| 21 | pre.none { padding:5px; background-color:#ffffff } | 
|---|
| 22 | </style> | 
|---|
| 23 | </head> | 
|---|
| 24 |  | 
|---|
| 25 | <body bgcolor=white> | 
|---|
| 26 |  | 
|---|
| 27 | <h2> EDITOR-HINTS.NAMED-READTABLES - 0.9</h2> | 
|---|
| 28 |  | 
|---|
| 29 | <h5>     by Tobias C Rittweiler </h5> | 
|---|
| 30 |  | 
|---|
| 31 | <font color=red>Repository:</font> <br> <br> | 
|---|
| 32 |  | 
|---|
| 33 |      | 
|---|
| 34 | <code>darcs get http://common-lisp.net/project/editor-hints/darcs/named-readtables/</code> | 
|---|
| 35 |  | 
|---|
| 36 | <br> <br> | 
|---|
| 37 |  | 
|---|
| 38 | <font color=red>Download:</font> <br> <br> | 
|---|
| 39 |  | 
|---|
| 40 |      | 
|---|
| 41 | <a href="http://common-lisp.net/project/editor-hints/releases/named-readtables-0.9.tar.gz">editor-hints.named-readtables-0.9.tar.gz </a><br> <br><h3><a class=none name="contents">Contents</a></h3> | 
|---|
| 42 | <ol> | 
|---|
| 43 | <li> <a href="#what_are_named-readtables?">What are Named-Readtables?</a> | 
|---|
| 44 | <li> <a href="#notes_on_the_api">Notes on the API</a> | 
|---|
| 45 | <li> <a href="#important_api_idiosyncrasies">Important API idiosyncrasies</a> | 
|---|
| 46 | <li> <a href="#preregistered_readtables">Preregistered Readtables</a> | 
|---|
| 47 | <li> <a href="#examples">Examples</a> | 
|---|
| 48 | <li> <a href="#acknowledgements">Acknowledgements</a> | 
|---|
| 49 |  | 
|---|
| 50 |  | 
|---|
| 51 | <li><a href="#dictionary">Dictionary</a> | 
|---|
| 52 | <ol> | 
|---|
| 53 | <li><a href="#COPY-NAMED-READTABLE"><code>COPY-NAMED-READTABLE</code></a> | 
|---|
| 54 | <li><a href="#DEFREADTABLE"><code>DEFREADTABLE</code></a> | 
|---|
| 55 | <li><a href="#ENSURE-READTABLE"><code>ENSURE-READTABLE</code></a> | 
|---|
| 56 | <li><a href="#FIND-READTABLE"><code>FIND-READTABLE</code></a> | 
|---|
| 57 | <li><a href="#IN-READTABLE"><code>IN-READTABLE</code></a> | 
|---|
| 58 | <li><a href="#LIST-ALL-NAMED-READTABLES"><code>LIST-ALL-NAMED-READTABLES</code></a> | 
|---|
| 59 | <li><a href="#MAKE-READTABLE"><code>MAKE-READTABLE</code></a> | 
|---|
| 60 | <li><a href="#MERGE-READTABLES-INTO"><code>MERGE-READTABLES-INTO</code></a> | 
|---|
| 61 | <li><a href="#NAMED-READTABLE-DESIGNATOR"><code>NAMED-READTABLE-DESIGNATOR</code></a> | 
|---|
| 62 | <li><a href="#READER-MACRO-CONFLICT"><code>READER-MACRO-CONFLICT</code></a> | 
|---|
| 63 | <li><a href="#READTABLE-DOES-ALREADY-EXIST"><code>READTABLE-DOES-ALREADY-EXIST</code></a> | 
|---|
| 64 | <li><a href="#READTABLE-DOES-NOT-EXIST"><code>READTABLE-DOES-NOT-EXIST</code></a> | 
|---|
| 65 | <li><a href="#READTABLE-NAME"><code>READTABLE-NAME</code></a> | 
|---|
| 66 | <li><a href="#REGISTER-READTABLE"><code>REGISTER-READTABLE</code></a> | 
|---|
| 67 | <li><a href="#RENAME-READTABLE"><code>RENAME-READTABLE</code></a> | 
|---|
| 68 | <li><a href="#UNREGISTER-READTABLE"><code>UNREGISTER-READTABLE</code></a> | 
|---|
| 69 |  | 
|---|
| 70 | </ol> | 
|---|
| 71 | </ol> <br> <br><h3><a class=none name="what_are_named-readtables?">What are Named-Readtables?</a></h3> | 
|---|
| 72 |     Named-Readtables is a library that provides a namespace for readtables akin to the <br>     already-existing namespace of packages. In particular: | 
|---|
| 73 | <ul> | 
|---|
| 74 |           <li>you can associate readtables with names, and retrieve readtables by names;</li> | 
|---|
| 75 |           <li>you can associate source files with readtable names, and be sure that the right readtable is <br> active when compiling/loading the file;</li> | 
|---|
| 76 |           <li>similiarly, your development environment now has a chance to automatically determine what <br> readtable should be active while processing source forms on interactive commands. (E.g. think <br> of `C-c C-c' in Slime [yet to be done])</li> | 
|---|
| 77 | </ul> | 
|---|
| 78 |     Additionally, it also attempts to become a facility for using readtables in a <u>modular</u> way. In <br>     particular: | 
|---|
| 79 | <ul> | 
|---|
| 80 |           <li>it provides a macro to specify the content of a readtable at a glance;</li> | 
|---|
| 81 |           <li>it makes it possible to use multiple inheritance between readtables.</li> | 
|---|
| 82 | </ul> | 
|---|
| 83 | <br> <br><h3><a class=none name="notes_on_the_api">Notes on the API</a></h3> | 
|---|
| 84 |     The <code>API</code> heavily imitates the <code>API</code> of packages. This has the nice property that any experienced <br>     Common Lisper will take it up without effort. | 
|---|
| 85 | <br><br> | 
|---|
| 86 |             <code><a href="#DEFREADTABLE"><code>DEFREADTABLE</code></a></code> - <code><a href="http://www.lispworks.com/reference/HyperSpec/Body/m_defpkg.htm"><code>DEFPACKAGE</code></a></code> | 
|---|
| 87 | <br><br> | 
|---|
| 88 |             <code><a href="#IN-READTABLE"><code>IN-READTABLE</code></a></code> - <code><a href="http://www.lispworks.com/reference/HyperSpec/Body/m_in_pkg.htm"><code>IN-PACKAGE</code></a></code> | 
|---|
| 89 | <br><br> | 
|---|
| 90 |             <code><a href="#MERGE-READTABLES-INTO"><code>MERGE-READTABLES-INTO</code></a></code> - <code><a href="http://www.lispworks.com/reference/HyperSpec/Body/f_use_pk.htm"><code>USE-PACKAGE</code></a></code> | 
|---|
| 91 | <br><br> | 
|---|
| 92 |             <code><a href="#MAKE-READTABLE"><code>MAKE-READTABLE</code></a></code> - <code><a href="http://www.lispworks.com/reference/HyperSpec/Body/f_mk_pkg.htm"><code>MAKE-PACKAGE</code></a></code> | 
|---|
| 93 | <br><br> | 
|---|
| 94 |             <code><a href="#UNREGISTER-READTABLE"><code>UNREGISTER-READTABLE</code></a></code> - <code><a href="http://www.lispworks.com/reference/HyperSpec/Body/f_del_pk.htm"><code>DELETE-PACKAGE</code></a></code> | 
|---|
| 95 | <br><br> | 
|---|
| 96 |             <code><a href="#RENAME-READTABLE"><code>RENAME-READTABLE</code></a></code> - <code><a href="http://www.lispworks.com/reference/HyperSpec/Body/f_rn_pkg.htm"><code>RENAME-PACKAGE</code></a></code> | 
|---|
| 97 | <br><br> | 
|---|
| 98 |             <code><a href="#FIND-READTABLE"><code>FIND-READTABLE</code></a></code> - <code><a href="http://www.lispworks.com/reference/HyperSpec/Body/f_find_p.htm"><code>FIND-PACKAGE</code></a></code> | 
|---|
| 99 | <br><br> | 
|---|
| 100 |             <code><a href="#READTABLE-NAME"><code>READTABLE-NAME</code></a></code> - <code><a href="http://www.lispworks.com/reference/HyperSpec/Body/f_pkg_na.htm"><code>PACKAGE-NAME</code></a></code> | 
|---|
| 101 | <br><br> | 
|---|
| 102 |             <code><a href="#LIST-ALL-NAMED-READTABLES"><code>LIST-ALL-NAMED-READTABLES</code></a></code> - <code><a href="http://www.lispworks.com/reference/HyperSpec/Body/f_list_a.htm"><code>LIST-ALL-PACKAGES</code></a></code> | 
|---|
| 103 | <br> <br><h3><a class=none name="important_api_idiosyncrasies">Important API idiosyncrasies</a></h3> | 
|---|
| 104 |     There are three major differences between the <code>API</code> of Named-Readtables, and the <code>API</code> of packages. | 
|---|
| 105 | <br><br> | 
|---|
| 106 |       <code>1.</code> Readtable names are symbols not strings. | 
|---|
| 107 | <br><br> | 
|---|
| 108 |                 Time has shown that the fact that packages are named by strings causes severe headache because of <br>                 the potential of package names colliding with each other. | 
|---|
| 109 | <br><br> | 
|---|
| 110 |                 Hence, readtables are named by symbols lest to make the situation worse than it already is. <br>                 Consequently, readtables named <code>CL-ORACLE:SQL-SYNTAX</code> and <code>CL-MYSQL:SQL-SYNTAX</code> can happily coexist <br>                 next to each other. Or, taken to an extreme, <code>SCHEME:SYNTAX</code> and <code>ELISP:SYNTAX.</code> | 
|---|
| 111 | <br><br> | 
|---|
| 112 |                 If, for example to duly signify the importance of your cool readtable hack, you really think it <br>                 deserves a global name, you can always resort to keywords. | 
|---|
| 113 | <br><br> | 
|---|
| 114 |       <code>2.</code> The inheritance is resolved statically, not dynamically. | 
|---|
| 115 | <br><br> | 
|---|
| 116 |                 A package that uses another package will have access to all the other package's exported <br>                 symbols, even to those that will be added after its definition. I.e. the inheritance is resolved at <br>                 run-time, that is dynamically. | 
|---|
| 117 | <br><br> | 
|---|
| 118 |                 Unfortunately, we cannot do the same for readtables in a portable manner. | 
|---|
| 119 | <br><br> | 
|---|
| 120 |                 Therefore, we do not talk about "using" another readtable but about "merging" <br>                 the other readtable's definition into the readtable we are going to define. I.e. the <br>                 inheritance is resolved once at definition time, that is statically. | 
|---|
| 121 | <br><br> | 
|---|
| 122 |                 (Such merging can more or less be implemented portably albeit at a certain cost. Most of the time, <br>                 this cost manifests itself at the time a readtable is defined, i.e. once at compile-time, so it may <br>                 not bother you. Nonetheless, we provide extra support for Sbcl, ClozureCL, and AllegroCL at the <br>                 moment. Patches for your implementation of choice are welcome, of course.) | 
|---|
| 123 | <br><br> | 
|---|
| 124 |       <code>3.</code> <code><a href="#DEFREADTABLE"><code>DEFREADTABLE</code></a></code> does not have compile-time effects. | 
|---|
| 125 | <br><br> | 
|---|
| 126 |                 If you define a package via <code><a href="http://www.lispworks.com/reference/HyperSpec/Body/m_defpkg.htm"><code>DEFPACKAGE</code></a>,</code> you can make that package the currently active package for <br>                 the subsequent compilation of the same file via <code><a href="http://www.lispworks.com/reference/HyperSpec/Body/m_in_pkg.htm"><code>IN-PACKAGE</code></a>.</code> The same is, however, not true for <br>                 <code><a href="#DEFREADTABLE"><code>DEFREADTABLE</code></a></code> and <code><a href="#IN-READTABLE"><code>IN-READTABLE</code></a></code> for the following reason: | 
|---|
| 127 | <br><br> | 
|---|
| 128 |                 It's unlikely that the need for special reader-macros arises for a problem which can be <br>                 solved in just one file. Most often, you're going to define the reader macro functions, and <br>                 set up the corresponding readtable in an extra file. | 
|---|
| 129 | <br><br> | 
|---|
| 130 |                 If <code><a href="#DEFREADTABLE"><code>DEFREADTABLE</code></a></code> had compile-time effects, you'd have to wrap each definition of a <br>                 reader-macro function in an <code><a href="http://www.lispworks.com/reference/HyperSpec/Body/s_eval_w.htm"><code>EVAL-WHEN</code></a></code> to make its definition available at compile-time. Because <br>                 that's simply not the common case, <code><a href="#DEFREADTABLE"><code>DEFREADTABLE</code></a></code> does not have a compile-time effect. | 
|---|
| 131 | <br><br> | 
|---|
| 132 |                 If you want to use a readtable within the same file as its definition, wrap the <code><a href="#DEFREADTABLE"><code>DEFREADTABLE</code></a></code> and <br>                 the reader-macro function definitions in an explicit <code><a href="http://www.lispworks.com/reference/HyperSpec/Body/s_eval_w.htm"><code>EVAL-WHEN</code></a>.</code> | 
|---|
| 133 | <br> <br><h3><a class=none name="preregistered_readtables">Preregistered Readtables</a></h3> | 
|---|
| 134 |         - <code>NIL,</code> <code>:STANDARD,</code> and <code>:COMMON-LISP</code> designate the <i><a href="http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_s.htm#standard_readtable">standard readtable</a></i>. | 
|---|
| 135 | <br><br> | 
|---|
| 136 |         - <code>:MODERN</code> designates a <u>case-preserving</u> <i><a href="http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_s.htm#standard-readtable">standard-readtable</a></i>. | 
|---|
| 137 | <br><br> | 
|---|
| 138 |         - <code>:CURRENT</code> designates the <i><a href="http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_c.htm#current_readtable">current readtable</a></i>. | 
|---|
| 139 | <br> <br><h3><a class=none name="examples">Examples</a></h3> | 
|---|
| 140 | <pre> | 
|---|
| 141 | (defreadtable elisp:syntax | 
|---|
| 142 | (:merge :standard) | 
|---|
| 143 | (:macro-char #\? #'elisp::read-character-literal t) | 
|---|
| 144 | (:macro-char #\[ #'elisp::read-vector-literal t) | 
|---|
| 145 | ... | 
|---|
| 146 | (:case :preserve)) | 
|---|
| 147 |  | 
|---|
| 148 | (defreadtable scheme:syntax | 
|---|
| 149 | (:merge :standard) | 
|---|
| 150 | (:macro-char #\[ #'(lambda (stream char) | 
|---|
| 151 | (read-delimited-list #\] stream))) | 
|---|
| 152 | (:macro-char #\# :dispatch) | 
|---|
| 153 | (:dispatch-macro-char #\# #\t #'scheme::read-#t) | 
|---|
| 154 | (:dispatch-macro-char #\# #\f #'scheme::read-#f) | 
|---|
| 155 | ... | 
|---|
| 156 | (:case :preserve)) | 
|---|
| 157 |  | 
|---|
| 158 | (in-readtable elisp:syntax) | 
|---|
| 159 |  | 
|---|
| 160 | ... | 
|---|
| 161 |  | 
|---|
| 162 | (in-readtable scheme:syntax) | 
|---|
| 163 |  | 
|---|
| 164 | ... | 
|---|
| 165 | </pre> | 
|---|
| 166 |  | 
|---|
| 167 | <br> <br><h3><a class=none name="acknowledgements">Acknowledgements</a></h3> | 
|---|
| 168 |     Thanks to Robert Goldman for making me want to write this library. | 
|---|
| 169 | <br><br> | 
|---|
| 170 |     Thanks to Stephen Compall, Ariel Badichi, David Lichteblau, Bart Botta, David Crawford, and Pascal <br>     Costanza for being early adopters, providing comments and bugfixes. | 
|---|
| 171 | <br> <br> | 
|---|
| 172 | <br> <br><h3><a class=none name="dictionary">Dictionary</a></h3> | 
|---|
| 173 |  | 
|---|
| 174 |  | 
|---|
| 175 | <!-- Entry for COPY-NAMED-READTABLE --> | 
|---|
| 176 |  | 
|---|
| 177 | <p><br>[Function]<br><a class=none name='COPY-NAMED-READTABLE'><b>copy-named-readtable</b> <i>named-readtable</i> => <i>result</i></a><br><br>  Argument and Values:<blockquote><i>named-readtable</i>: <code>(OR | 
|---|
| 178 | READTABLE | 
|---|
| 179 | SYMBOL)</code></blockquote><blockquote><i>result</i>: <code>READTABLE</code></blockquote>  Description: | 
|---|
| 180 | <blockquote> | 
|---|
| 181 |  | 
|---|
| 182 | Like <code><a href="http://www.lispworks.com/reference/HyperSpec/Body/f_cp_rdt.htm"><code>COPY-READTABLE</code></a></code> but takes a <code><a href="#NAMED-READTABLE-DESIGNATOR"><code>NAMED-READTABLE-DESIGNATOR</code></a></code> as argument. | 
|---|
| 183 |  | 
|---|
| 184 |  | 
|---|
| 185 | </blockquote> | 
|---|
| 186 |  | 
|---|
| 187 | <!-- End of entry for COPY-NAMED-READTABLE --> | 
|---|
| 188 |  | 
|---|
| 189 |  | 
|---|
| 190 | <!-- Entry for DEFREADTABLE --> | 
|---|
| 191 |  | 
|---|
| 192 | <p><br>[Macro]<br><a class=none name='DEFREADTABLE'><b>defreadtable</b> <i>name &body options</i> => <i>result</i></a><br><br>  Description: | 
|---|
| 193 | <blockquote> | 
|---|
| 194 |  | 
|---|
| 195 | Define a new named readtable, whose name is given by the symbol <i>name</i>. Or, if a readtable is <br> already registered under that name, redefine that one. | 
|---|
| 196 | <br><br> | 
|---|
| 197 | The readtable can be populated using the following <i>options</i>: | 
|---|
| 198 | <br><br> | 
|---|
| 199 |     <code>(:MERGE</code> <i>readtable-designators</i>+) | 
|---|
| 200 | <br><br> | 
|---|
| 201 |             Merge the readtables designated into the new readtable being defined as per <code><a href="#MERGE-READTABLES-INTO"><code>MERGE-READTABLES-INTO</code></a>.</code> | 
|---|
| 202 | <br><br> | 
|---|
| 203 |             If no <code>:MERGE</code> clause is given, an empty readtable is used. See <code><a href="#MAKE-READTABLE"><code>MAKE-READTABLE</code></a>.</code> | 
|---|
| 204 | <br><br> | 
|---|
| 205 |     <code>(:FUZE</code> <i>readtable-designators</i>+) | 
|---|
| 206 | <br><br> | 
|---|
| 207 |             Like <code>:MERGE</code> except: | 
|---|
| 208 | <br><br> | 
|---|
| 209 |             Error conditions of type <code><a href="#READER-MACRO-CONFLICT"><code>READER-MACRO-CONFLICT</code></a></code> that are signaled during the merge operation will <br>             be silently <u>continued</u>. It follows that reader macros in earlier entries will be overwritten by <br>             later ones. | 
|---|
| 210 | <br><br> | 
|---|
| 211 |     <code>(:DISPATCH-MACRO-CHAR</code> <i>macro-char</i> <i>sub-char</i> <i>function</i>) | 
|---|
| 212 | <br><br> | 
|---|
| 213 |             Define a new sub character <i>sub-char</i> for the dispatching macro character <i>macro-char</i>, <br>             per <code><a href="http://www.lispworks.com/reference/HyperSpec/Body/f_set__1.htm"><code>SET-DISPATCH-MACRO-CHARACTER</code></a>.</code> You probably have to define <i>macro-char</i> as a dispatching <br>             macro character by the following option first. | 
|---|
| 214 | <br><br> | 
|---|
| 215 |     <code>(:MACRO-CHAR</code> <i>macro-char</i> <i>function</i> [<i>non-terminating-p</i>]) | 
|---|
| 216 | <br><br> | 
|---|
| 217 |             Define a new macro character in the readtable, per <code><a href="http://www.lispworks.com/reference/HyperSpec/Body/f_set_ma.htm"><code>SET-MACRO-CHARACTER</code></a>.</code> If <i>function</i> is the <br>             keyword <code>:DISPATCH,</code> <i>macro-char</i> is made a dispatching macro character, per <br>             <code><a href="http://www.lispworks.com/reference/HyperSpec/Body/f_mk_dis.htm"><code>MAKE-DISPATCH-MACRO-CHARACTER</code></a>.</code> | 
|---|
| 218 | <br><br> | 
|---|
| 219 |     <code>(:SYNTAX-FROM</code> <i>from-readtable-designator</i> <i>from-char</i> <i>to-char</i>) | 
|---|
| 220 | <br><br> | 
|---|
| 221 |             Set the character syntax of <i>to-char</i> in the readtable being defined to the same syntax as <br>             <i>from-char</i> as per <code><a href="http://www.lispworks.com/reference/HyperSpec/Body/f_set_sy.htm"><code>SET-SYNTAX-FROM-CHAR</code></a>.</code> | 
|---|
| 222 | <br><br> | 
|---|
| 223 |     <code>(:CASE</code> <i>case-mode</i>) | 
|---|
| 224 | <br><br> | 
|---|
| 225 |             Defines the <i><a href="http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_c.htm#case_sensitivity_mode">case sensitivity mode</a></i> of the resulting readtable. | 
|---|
| 226 | <br><br> | 
|---|
| 227 | Any number of option clauses may appear. The options are grouped by their type, but in each group <br> the order the options appeared textually is preserved. The following groups exist and are executed <br> in the following order: <code>:MERGE</code> and <code>:FUZE</code> (one group), <code>:CASE,</code> <code>:MACRO-CHAR</code> and <code>:DISPATCH-MACRO-CHAR</code> <br> (one group), finally <code>:SYNTAX-FROM.</code> | 
|---|
| 228 | <br><br> | 
|---|
| 229 | Notes: | 
|---|
| 230 | <br><br> | 
|---|
| 231 |     The readtable is defined at load-time. If you want to have it available at compilation time <code><a href="http://www.lispworks.com/reference/HyperSpec/Body/a__.htm"><code>-</code></a>-</code> say <br>     to use its reader-macros in the same file as its definition <code><a href="http://www.lispworks.com/reference/HyperSpec/Body/a__.htm"><code>-</code></a>-</code> you have to wrap the <code><a href="#DEFREADTABLE"><code>DEFREADTABLE</code></a></code> <br>     form in an explicit <code><a href="http://www.lispworks.com/reference/HyperSpec/Body/s_eval_w.htm"><code>EVAL-WHEN</code></a>.</code> | 
|---|
| 232 | <br><br> | 
|---|
| 233 |     On redefinition, the target readtable is made empty first before it's refilled according to <br>     the clauses. | 
|---|
| 234 | <br><br> | 
|---|
| 235 |     <code>NIL,</code> <code>:STANDARD,</code> <code>:COMMON-LISP,</code> <code>:MODERN,</code> and <code>:CURRENT</code> are preregistered readtable names. | 
|---|
| 236 |  | 
|---|
| 237 |  | 
|---|
| 238 | </blockquote> | 
|---|
| 239 |  | 
|---|
| 240 | <!-- End of entry for DEFREADTABLE --> | 
|---|
| 241 |  | 
|---|
| 242 |  | 
|---|
| 243 | <!-- Entry for ENSURE-READTABLE --> | 
|---|
| 244 |  | 
|---|
| 245 | <p><br>[Function]<br><a class=none name='ENSURE-READTABLE'><b>ensure-readtable</b> <i>name <tt>&optional</tt> default</i> => <i>result</i></a><br><br>  Argument and Values:<blockquote><i>name</i>: <code>(OR | 
|---|
| 246 | READTABLE | 
|---|
| 247 | SYMBOL)</code></blockquote><blockquote><i>default</i>: <code>(OR | 
|---|
| 248 | READTABLE | 
|---|
| 249 | SYMBOL)</code></blockquote><blockquote><i>result</i>: <code>READTABLE</code></blockquote>  Description: | 
|---|
| 250 | <blockquote> | 
|---|
| 251 |  | 
|---|
| 252 | Looks up the readtable specified by <i>name</i> and returns it if it's found. If it is not <br> found, it registers the readtable designated by <i>default</i> under the name represented by <br> <i>name</i>; or if no default argument is given, it signals an error of type <br> <code><a href="#READTABLE-DOES-NOT-EXIST"><code>READTABLE-DOES-NOT-EXIST</code></a></code> instead. | 
|---|
| 253 |  | 
|---|
| 254 |  | 
|---|
| 255 | </blockquote> | 
|---|
| 256 |  | 
|---|
| 257 | <!-- End of entry for ENSURE-READTABLE --> | 
|---|
| 258 |  | 
|---|
| 259 |  | 
|---|
| 260 | <!-- Entry for FIND-READTABLE --> | 
|---|
| 261 |  | 
|---|
| 262 | <p><br>[Function]<br><a class=none name='FIND-READTABLE'><b>find-readtable</b> <i>name</i> => <i>result</i></a><br><br>  Argument and Values:<blockquote><i>name</i>: <code>(OR | 
|---|
| 263 | READTABLE | 
|---|
| 264 | SYMBOL)</code></blockquote><blockquote><i>result</i>: <code>(OR | 
|---|
| 265 | READTABLE | 
|---|
| 266 | NULL)</code></blockquote>  Description: | 
|---|
| 267 | <blockquote> | 
|---|
| 268 |  | 
|---|
| 269 | Looks for the readtable specified by <i>name</i> and returns it if it is found. Returns <code>NIL</code> <br> otherwise. | 
|---|
| 270 |  | 
|---|
| 271 |  | 
|---|
| 272 | </blockquote> | 
|---|
| 273 |  | 
|---|
| 274 | <!-- End of entry for FIND-READTABLE --> | 
|---|
| 275 |  | 
|---|
| 276 |  | 
|---|
| 277 | <!-- Entry for IN-READTABLE --> | 
|---|
| 278 |  | 
|---|
| 279 | <p><br>[Macro]<br><a class=none name='IN-READTABLE'><b>in-readtable</b> <i>name</i> => <i>result</i></a><br><br>  Description: | 
|---|
| 280 | <blockquote> | 
|---|
| 281 |  | 
|---|
| 282 | Set <code><a href="http://www.lispworks.com/reference/HyperSpec/Body/v_rdtabl.htm"><code>*READTABLE*</code></a></code> to the readtable referred to by the symbol <i>name</i>. | 
|---|
| 283 |  | 
|---|
| 284 |  | 
|---|
| 285 | </blockquote> | 
|---|
| 286 |  | 
|---|
| 287 | <!-- End of entry for IN-READTABLE --> | 
|---|
| 288 |  | 
|---|
| 289 |  | 
|---|
| 290 | <!-- Entry for LIST-ALL-NAMED-READTABLES --> | 
|---|
| 291 |  | 
|---|
| 292 | <p><br>[Function]<br><a class=none name='LIST-ALL-NAMED-READTABLES'><b>list-all-named-readtables</b> <i></i> => <i>result</i></a><br><br>  Argument and Values:<blockquote><i>result</i>: <code>LIST</code></blockquote>  Description: | 
|---|
| 293 | <blockquote> | 
|---|
| 294 |  | 
|---|
| 295 | Returns a list of all registered readtables. The returned list is guaranteed to be fresh, but may <br> contain duplicates. | 
|---|
| 296 |  | 
|---|
| 297 |  | 
|---|
| 298 | </blockquote> | 
|---|
| 299 |  | 
|---|
| 300 | <!-- End of entry for LIST-ALL-NAMED-READTABLES --> | 
|---|
| 301 |  | 
|---|
| 302 |  | 
|---|
| 303 | <!-- Entry for MAKE-READTABLE --> | 
|---|
| 304 |  | 
|---|
| 305 | <p><br>[Function]<br><a class=none name='MAKE-READTABLE'><b>make-readtable</b> <i><tt>&optional</tt> name <tt>&key</tt> merge</i> => <i>result</i></a><br><br>  Argument and Values:<blockquote><i>name</i>: <code>(OR | 
|---|
| 306 | READTABLE | 
|---|
| 307 | SYMBOL)</code></blockquote><blockquote><i>merge</i>: <code>LIST</code></blockquote><blockquote><i>result</i>: <code>READTABLE</code></blockquote>  Description: | 
|---|
| 308 | <blockquote> | 
|---|
| 309 |  | 
|---|
| 310 | Creates and returns a new readtable under the specified <i>name</i>. | 
|---|
| 311 | <br><br> | 
|---|
| 312 | <i>merge</i> takes a list of <code><a href="#NAMED-READTABLE-DESIGNATORS"><code>NAMED-READTABLE-DESIGNATORS</code></a></code> and specifies the readtables the new <br> readtable is created from. (See the <code>:MERGE</code> clause of <code><a href="#DEFREADTABLE"><code>DEFREADTABLE</code></a></code> for details.) | 
|---|
| 313 | <br><br> | 
|---|
| 314 | If <i>merge</i> is <code>NIL,</code> an empty readtable is used instead. | 
|---|
| 315 | <br><br> | 
|---|
| 316 | If <i>name</i> is not given, an anonymous empty readtable is returned. | 
|---|
| 317 | <br><br> | 
|---|
| 318 | Notes: | 
|---|
| 319 | <br><br> | 
|---|
| 320 |     An empty readtable is a readtable where each character's syntax is the same as in the <br>     <i><a href="http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_s.htm#standard_readtable">standard readtable</a></i> except that each macro character has been made a constituent. Basically: <br>     whitespace stays whitespace, everything else is constituent. | 
|---|
| 321 |  | 
|---|
| 322 |  | 
|---|
| 323 | </blockquote> | 
|---|
| 324 |  | 
|---|
| 325 | <!-- End of entry for MAKE-READTABLE --> | 
|---|
| 326 |  | 
|---|
| 327 |  | 
|---|
| 328 | <!-- Entry for MERGE-READTABLES-INTO --> | 
|---|
| 329 |  | 
|---|
| 330 | <p><br>[Function]<br><a class=none name='MERGE-READTABLES-INTO'><b>merge-readtables-into</b> <i>result-readtable <tt>&rest</tt> named-readtables</i> => <i>result</i></a><br><br>  Argument and Values:<blockquote><i>result-readtable</i>: <code>(OR | 
|---|
| 331 | READTABLE | 
|---|
| 332 | SYMBOL)</code></blockquote><blockquote><i>named-readtables</i>: <code>(OR | 
|---|
| 333 | READTABLE | 
|---|
| 334 | SYMBOL)</code></blockquote><blockquote><i>result</i>: <code>READTABLE</code></blockquote>  Description: | 
|---|
| 335 | <blockquote> | 
|---|
| 336 |  | 
|---|
| 337 | Copy the contents of each readtable in <i>named-readtables</i> into <i>result-table</i>. | 
|---|
| 338 | <br><br> | 
|---|
| 339 | If a macro character appears in more than one of the readtables, i.e. if a conflict is discovered <br> during the merge, an error of type <code><a href="#READER-MACRO-CONFLICT"><code>READER-MACRO-CONFLICT</code></a></code> is signaled. | 
|---|
| 340 |  | 
|---|
| 341 |  | 
|---|
| 342 | </blockquote> | 
|---|
| 343 |  | 
|---|
| 344 | <!-- End of entry for MERGE-READTABLES-INTO --> | 
|---|
| 345 |  | 
|---|
| 346 |  | 
|---|
| 347 | <!-- Entry for NAMED-READTABLE-DESIGNATOR --> | 
|---|
| 348 |  | 
|---|
| 349 | <p><br>[Type]<br><a class=none name='NAMED-READTABLE-DESIGNATOR'><b>named-readtable-designator</b></a><br><br>  Description: | 
|---|
| 350 | <blockquote> | 
|---|
| 351 |  | 
|---|
| 352 | Either a symbol or a readtable itself. | 
|---|
| 353 |  | 
|---|
| 354 |  | 
|---|
| 355 | </blockquote> | 
|---|
| 356 |  | 
|---|
| 357 | <!-- End of entry for NAMED-READTABLE-DESIGNATOR --> | 
|---|
| 358 |  | 
|---|
| 359 |  | 
|---|
| 360 | <!-- Entry for READER-MACRO-CONFLICT --> | 
|---|
| 361 |  | 
|---|
| 362 | <p><br>[Condition type]<br><a class=none name='READER-MACRO-CONFLICT'><b>reader-macro-conflict</b></a><br><br>  Description: | 
|---|
| 363 | <blockquote> | 
|---|
| 364 |  | 
|---|
| 365 | Continuable. | 
|---|
| 366 | <br><br> | 
|---|
| 367 | This condition is signaled during the merge process if a) a reader macro (be it a macro character <br> or the sub character of a dispatch macro character) is both present in the source as well as the <br> target readtable, and b) if and only if the two respective reader macro functions differ. | 
|---|
| 368 |  | 
|---|
| 369 |  | 
|---|
| 370 | </blockquote> | 
|---|
| 371 |  | 
|---|
| 372 | <!-- End of entry for READER-MACRO-CONFLICT --> | 
|---|
| 373 |  | 
|---|
| 374 |  | 
|---|
| 375 | <!-- Entry for READTABLE-DOES-ALREADY-EXIST --> | 
|---|
| 376 |  | 
|---|
| 377 | <p><br>[Condition type]<br><a class=none name='READTABLE-DOES-ALREADY-EXIST'><b>readtable-does-already-exist</b></a><br><br>  Description: | 
|---|
| 378 | <blockquote> | 
|---|
| 379 |  | 
|---|
| 380 | Continuable. | 
|---|
| 381 |  | 
|---|
| 382 |  | 
|---|
| 383 | </blockquote> | 
|---|
| 384 |  | 
|---|
| 385 | <!-- End of entry for READTABLE-DOES-ALREADY-EXIST --> | 
|---|
| 386 |  | 
|---|
| 387 |  | 
|---|
| 388 | <!-- Entry for READTABLE-DOES-NOT-EXIST --> | 
|---|
| 389 |  | 
|---|
| 390 | <p><br>[Condition type]<br><a class=none name='READTABLE-DOES-NOT-EXIST'><b>readtable-does-not-exist</b></a><br><br> | 
|---|
| 391 | <blockquote> | 
|---|
| 392 |  | 
|---|
| 393 |  | 
|---|
| 394 |  | 
|---|
| 395 | </blockquote> | 
|---|
| 396 |  | 
|---|
| 397 | <!-- End of entry for READTABLE-DOES-NOT-EXIST --> | 
|---|
| 398 |  | 
|---|
| 399 |  | 
|---|
| 400 | <!-- Entry for READTABLE-NAME --> | 
|---|
| 401 |  | 
|---|
| 402 | <p><br>[Function]<br><a class=none name='READTABLE-NAME'><b>readtable-name</b> <i>named-readtable</i> => <i>result</i></a><br><br>  Argument and Values:<blockquote><i>named-readtable</i>: <code>(OR | 
|---|
| 403 | READTABLE | 
|---|
| 404 | SYMBOL)</code></blockquote><blockquote><i>result</i>: <code>SYMBOL</code></blockquote>  Description: | 
|---|
| 405 | <blockquote> | 
|---|
| 406 |  | 
|---|
| 407 | Returns the name of the readtable designated by <i>named-readtable</i>, or <code>NIL.</code> | 
|---|
| 408 |  | 
|---|
| 409 |  | 
|---|
| 410 | </blockquote> | 
|---|
| 411 |  | 
|---|
| 412 | <!-- End of entry for READTABLE-NAME --> | 
|---|
| 413 |  | 
|---|
| 414 |  | 
|---|
| 415 | <!-- Entry for REGISTER-READTABLE --> | 
|---|
| 416 |  | 
|---|
| 417 | <p><br>[Function]<br><a class=none name='REGISTER-READTABLE'><b>register-readtable</b> <i>name readtable</i> => <i>result</i></a><br><br>  Argument and Values:<blockquote><i>name</i>: <code>SYMBOL</code></blockquote><blockquote><i>readtable</i>: <code>READTABLE</code></blockquote><blockquote><i>result</i>: <code>READTABLE</code></blockquote>  Description: | 
|---|
| 418 | <blockquote> | 
|---|
| 419 |  | 
|---|
| 420 | Associate <i>readtable</i> with <i>name</i>. Returns the readtable. | 
|---|
| 421 |  | 
|---|
| 422 |  | 
|---|
| 423 | </blockquote> | 
|---|
| 424 |  | 
|---|
| 425 | <!-- End of entry for REGISTER-READTABLE --> | 
|---|
| 426 |  | 
|---|
| 427 |  | 
|---|
| 428 | <!-- Entry for RENAME-READTABLE --> | 
|---|
| 429 |  | 
|---|
| 430 | <p><br>[Function]<br><a class=none name='RENAME-READTABLE'><b>rename-readtable</b> <i>old-name new-name</i> => <i>result</i></a><br><br>  Argument and Values:<blockquote><i>old-name</i>: <code>(OR | 
|---|
| 431 | READTABLE | 
|---|
| 432 | SYMBOL)</code></blockquote><blockquote><i>new-name</i>: <code>SYMBOL</code></blockquote><blockquote><i>result</i>: <code>READTABLE</code></blockquote>  Description: | 
|---|
| 433 | <blockquote> | 
|---|
| 434 |  | 
|---|
| 435 | Replaces the associated name of the readtable designated by <i>old-name</i> with <i>new-name</i>. <br> If a readtable is already registered under <i>new-name</i>, an error of type <br> <code><a href="#READTABLE-DOES-ALREADY-EXIST"><code>READTABLE-DOES-ALREADY-EXIST</code></a></code> is signaled. | 
|---|
| 436 |  | 
|---|
| 437 |  | 
|---|
| 438 | </blockquote> | 
|---|
| 439 |  | 
|---|
| 440 | <!-- End of entry for RENAME-READTABLE --> | 
|---|
| 441 |  | 
|---|
| 442 |  | 
|---|
| 443 | <!-- Entry for UNREGISTER-READTABLE --> | 
|---|
| 444 |  | 
|---|
| 445 | <p><br>[Function]<br><a class=none name='UNREGISTER-READTABLE'><b>unregister-readtable</b> <i>named-readtable</i> => <i>result</i></a><br><br>  Argument and Values:<blockquote><i>named-readtable</i>: <code>(OR | 
|---|
| 446 | READTABLE | 
|---|
| 447 | SYMBOL)</code></blockquote><blockquote><i>result</i>: <code>(MEMBER | 
|---|
| 448 | T | 
|---|
| 449 | NIL)</code></blockquote>  Description: | 
|---|
| 450 | <blockquote> | 
|---|
| 451 |  | 
|---|
| 452 | Remove the association of <i>named-readtable</i>. Returns <code><a href="http://www.lispworks.com/reference/HyperSpec/Body/a_t.htm"><code>T</code></a></code> if successfull, <code>NIL</code> otherwise. | 
|---|
| 453 |  | 
|---|
| 454 |  | 
|---|
| 455 | </blockquote> | 
|---|
| 456 |  | 
|---|
| 457 | <!-- End of entry for UNREGISTER-READTABLE --> | 
|---|
| 458 |  | 
|---|
| 459 |  | 
|---|
| 460 | <hr> | 
|---|
| 461 | <p> | 
|---|
| 462 | This documentation was generated on 2009-11-5 from a Lisp image using some home-brewn, | 
|---|
| 463 | duct-taped, <br> evolutionary hacked extension of Edi Weitz' | 
|---|
| 464 | <a href="http://weitz.de/documentation-template/">DOCUMENTATION-TEMPLATE</a>. | 
|---|
| 465 | </p> | 
|---|
| 466 |  | 
|---|
| 467 | </body> | 
|---|
| 468 | </html> | 
|---|