named-readtable

$Revision: 5.0.2.2 $

Function

Package: EXCL

Arguments: (name &optional errorp)

This function looks up a readtable by name. name must be a symbol, but it is coerced to a keyword (so readtables are named by keywords). cl:setf may be used to associate a name to a readtable. The association can be broken by setting to nil. Naming readtables is particularly useful for editors (see the description of Emacs file mode line support for named readtables in eli/readme.htm.htm).

This function returns the readtable named by name. If no such readtable exists, this function returns nil if errorp is nil (the default) and signals an error if errorp is true.

Here is an example:

user(2): (setq my-rt (copy-readtable))
#<readtable @ #x4d4fa2>
user(3): (setf (named-readtable :mytable) my-rt)
#<readtable @ #x4d4fa2>
user(4): (named-readtable :mytable)
#<readtable @ #x4d4fa2>
user(5): (setf (named-readtable :mytable) nil)
nil
user(6): (named-readtable :mytable)
nil
user(7): (named-readtable :mytable t)
Error: There is no readtable named :mytable.
[1] user(8):

The general documentation description is in introduction.htm. The index is in index.htm.

Copyright (C) 1998-1999, Franz Inc., Berkeley, CA. All Rights Reserved.