The named-readtables Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The named-readtables Reference Manual

This is the named-readtables Reference Manual, version 0.9, generated automatically by Declt version 2.3 "Robert April" on Tue Feb 20 09:06:59 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

# Named Readtables Manual

###### \[in package EDITOR-HINTS.NAMED-READTABLES\]
## named-readtables ASDF System Details

- Version: 0.9
- Description: Library that creates a namespace for named readtable
  akin to the namespace of packages.
- Licence: BSD, see LICENSE
- Author: Tobias C. Rittweiler 
- Maintainer: Gábor Melis
- Mailto: [mega@retes.hu](mailto:mega@retes.hu)

## Introduction

Named-Readtables is a library that provides a namespace for
readtables akin to the already-existing namespace of packages. In
particular:

- you can associate readtables with names, and retrieve
  readtables by names;

- you can associate source files with readtable names, and be
  sure that the right readtable is active when compiling/loading
  the file;

- similiarly, your development environment now has a chance to
  automatically determine what readtable should be active while
  processing source forms on interactive commands. (E.g. think of
  `C-c C-c` in Slime (yet to be done))

It follows that Named-Readtables is a facility for using readtables in
a localized way.

Additionally, it also attempts to become a facility for using
readtables in a *modular* way. In particular:

- it provides a macro to specify the content of a readtable at a
 glance;

- it makes it possible to use multiple inheritance between readtables.


### Links

Here is the [official repository][named-readtables-repo] and the
[HTML documentation][named-readtables-doc] for the latest version.

[named-readtables-repo]: https://github.com/melisgl/named-readtables 

[named-readtables-doc]: http://melisgl.github.io/mgl-pax-world/named-readtables-manual.html 


### Acknowledgements

Thanks to Robert Goldman for making me want to write this library.

Thanks to Stephen Compall, Ariel Badichi, David Lichteblau, Bart
Botta, David Crawford, and Pascal Costanza for being early adopters,
providing comments and bugfixes.

## Overview

### Notes on the API

The API heavily imitates the API of packages. This has the nice
property that any experienced Common Lisper will take it up without
effort.

    DEFREADTABLE              -   DEFPACKAGE
    
    IN-READTABLE              -   IN-PACKAGE
    
    MERGE-READTABLES-INTO     -   USE-PACKAGE
    
    MAKE-READTABLE            -   MAKE-PACKAGE
    
    UNREGISTER-READTABLE      -   DELETE-PACKAGE
    
    RENAME-READTABLE          -   RENAME-PACKAGE
    
    FIND-READTABLE            -   FIND-PACKAGE
    
    READTABLE-NAME            -   PACKAGE-NAME
    
    LIST-ALL-NAMED-READTABLES -   LIST-ALL-PACKAGES


### Important API idiosyncrasies

There are three major differences between the API of Named-Readtables,
and the API of packages.

1. Readtable names are symbols not strings.

    Time has shown that the fact that packages are named by strings
    causes severe headache because of the potential of package names
    colliding with each other.

    Hence, readtables are named by symbols lest to make the
    situation worse than it already is. Consequently, readtables
    named `CL-ORACLE:SQL-SYNTAX` and `CL-MYSQL:SQL-SYNTAX` can
    happily coexist next to each other. Or, taken to an extreme,
    `SCHEME:SYNTAX` and `ELISP:SYNTAX`.

    If, for example to duly signify the importance of your cool
    readtable hack, you really think it deserves a global name, you
    can always resort to keywords.

2. The inheritance is resolved statically, not dynamically.

    A package that uses another package will have access to all the
    other package's exported symbols, even to those that will be
    added after its definition. I.e. the inheritance is resolved at
    run-time, that is dynamically.

    Unfortunately, we cannot do the same for readtables in a
    portable manner.

    Therefore, we do not talk about "using" another readtable but
    about "merging" the other readtable's definition into the
    readtable we are going to define. I.e. the inheritance is
    resolved once at definition time, that is statically.

    (Such merging can more or less be implemented portably albeit at
    a certain cost. Most of the time, this cost manifests itself at
    the time a readtable is defined, i.e. once at compile-time, so
    it may not bother you. Nonetheless, we provide extra support for
    Sbcl, ClozureCL, and AllegroCL at the moment. Patches for your
    implementation of choice are welcome, of course.)

3. DEFREADTABLE does not have compile-time effects.

    If you define a package via DEFPACKAGE, you can make that
    package the currently active package for the subsequent
    compilation of the same file via IN-PACKAGE. The same is,
    however, not true for DEFREADTABLE and IN-READTABLE for the
    following reason:

    It's unlikely that the need for special reader-macros arises for
    a problem which can be solved in just one file. Most often,
    you're going to define the reader macro functions, and set up
    the corresponding readtable in an extra file.

    If DEFREADTABLE had compile-time effects, you'd have to wrap
    each definition of a reader-macro function in an EVAL-WHEN to
    make its definition available at compile-time. Because that's
    simply not the common case, DEFREADTABLE does not have a
    compile-time effect.

    If you want to use a readtable within the same file as its
    definition, wrap the DEFREADTABLE and the reader-macro function
    definitions in an explicit EVAL-WHEN.


### Preregistered Readtables

- NIL, :STANDARD, and :COMMON-LISP designate the
*standard readtable*.

- :MODERN designates a *case-preserving* *standard-readtable*.

- :CURRENT designates the *current readtable*.


### Examples

```commonlisp
(defreadtable elisp:syntax
   (:merge :standard)
   (:macro-char #\? #'elisp::read-character-literal t)
   (:macro-char #\[ #'elisp::read-vector-literal t)
   ...
   (:case :preserve))

(defreadtable scheme:syntax
   (:merge :standard)
   (:macro-char #\[ #'(lambda (stream char)
                         (read-delimited-list #\] stream)))
   (:macro-char #\# :dispatch)
   (:dispatch-macro-char #\# #\t #'scheme::read-#t)
   (:dispatch-macro-char #\# #\f #'scheme::read-#f)
   ...
   (:case :preserve))

(in-readtable elisp:syntax)

...

(in-readtable scheme:syntax)

...
```


## Reference

- [macro] DEFREADTABLE NAME &BODY OPTIONS

    Define a new named readtable, whose name is given by the symbol NAME.
    Or, if a readtable is already registered under that name, redefine
    that one.
    
    The readtable can be populated using the following OPTIONS:
    
    - `(:MERGE READTABLE-DESIGNATORS+)`
    
        Merge the readtables designated into the new readtable being
        defined as per MERGE-READTABLES-INTO.
    
        If no :MERGE clause is given, an empty readtable is used. See
        MAKE-READTABLE.
    
    - `(:FUSE READTABLE-DESIGNATORS+)`
    
        Like :MERGE except:
    
        Error conditions of type READER-MACRO-CONFLICT that are signaled
        during the merge operation will be silently *continued*. It
        follows that reader macros in earlier entries will be
        overwritten by later ones. For backward compatibility, :FUZE is
        accepted as an alias of :FUSE.
    
    - `(:DISPATCH-MACRO-CHAR MACRO-CHAR SUB-CHAR FUNCTION)`
    
        Define a new sub character `SUB-CHAR` for the dispatching macro
        character `MACRO-CHAR`, per SET-DISPATCH-MACRO-CHARACTER. You
        probably have to define `MACRO-CHAR` as a dispatching macro
        character by the following option first.
    
    - `(:MACRO-CHAR MACRO-CHAR FUNCTION [NON-TERMINATING-P])`
    
        Define a new macro character in the readtable, per
        SET-MACRO-CHARACTER. If `FUNCTION` is the keyword :DISPATCH,
        `MACRO-CHAR` is made a dispatching macro character, per
        MAKE-DISPATCH-MACRO-CHARACTER.
    
    - `(:SYNTAX-FROM FROM-READTABLE-DESIGNATOR FROM-CHAR TO-CHAR)`
    
        Set the character syntax of TO-CHAR in the readtable being
        defined to the same syntax as FROM-CHAR as per
        SET-SYNTAX-FROM-CHAR.
    
    - `(:CASE CASE-MODE)`
    
        Defines the *case sensitivity mode* of the resulting readtable.
    
    Any number of option clauses may appear. The options are grouped by
    their type, but in each group the order the options appeared
    textually is preserved. The following groups exist and are executed
    in the following order: :MERGE and :FUSE (one
    group), :CASE, :MACRO-CHAR and :DISPATCH-MACRO-CHAR (one group),
    finally :SYNTAX-FROM.
    
    Notes:
    
    The readtable is defined at load-time. If you want to have it
    available at compilation time -- say to use its reader-macros in the
    same file as its definition -- you have to wrap the DEFREADTABLE
    form in an explicit EVAL-WHEN.
    
    On redefinition, the target readtable is made empty first before
    it's refilled according to the clauses.
    
    NIL, :STANDARD, :COMMON-LISP, :MODERN, and :CURRENT are
    preregistered readtable names.

- [macro] IN-READTABLE NAME

    Set *READTABLE* to the readtable referred to by the symbol NAME.

- [function] MAKE-READTABLE &OPTIONAL (NAME NIL NAME-SUPPLIED-P) &KEY MERGE

    Creates and returns a new readtable under the specified
    NAME.
    
    MERGE takes a list of NAMED-READTABLE-DESIGNATORS and specifies the
    readtables the new readtable is created from. (See the :MERGE clause
    of DEFREADTABLE for details.)
    
    If MERGE is NIL, an empty readtable is used instead.
    
    If NAME is not given, an anonymous empty readtable is returned.
    
    Notes:
    
    An empty readtable is a readtable where each character's syntax is
    the same as in the *standard readtable* except that each macro
    character has been made a constituent. Basically: whitespace stays
    whitespace, everything else is constituent.

- [function] MERGE-READTABLES-INTO RESULT-READTABLE &REST NAMED-READTABLES

    Copy the contents of each readtable in NAMED-READTABLES into
    RESULT-READTABLE.
    
    If a macro character appears in more than one of the readtables,
    i.e. if a conflict is discovered during the merge, an error of type
    READER-MACRO-CONFLICT is signaled.

- [function] FIND-READTABLE NAME

    Looks for the readtable specified by NAME and returns it if it is
    found. Returns NIL otherwise.

- [function] ENSURE-READTABLE NAME &OPTIONAL (DEFAULT NIL DEFAULT-P)

    Looks up the readtable specified by NAME and returns it if it's found.
    If it is not found, it registers the readtable designated by DEFAULT
    under the name represented by NAME; or if no default argument is
    given, it signals an error of type READTABLE-DOES-NOT-EXIST
    instead.

- [function] RENAME-READTABLE OLD-NAME NEW-NAME

    Replaces the associated name of the readtable designated by
    OLD-NAME with NEW-NAME. If a readtable is already registered under
    NEW-NAME, an error of type READTABLE-DOES-ALREADY-EXIST is
    signaled.

- [function] READTABLE-NAME NAMED-READTABLE

    Returns the name of the readtable designated by NAMED-READTABLE,
    or NIL.

- [function] REGISTER-READTABLE NAME READTABLE

    Associate READTABLE with NAME. Returns the readtable.

- [function] UNREGISTER-READTABLE NAMED-READTABLE

    Remove the association of NAMED-READTABLE. Returns T if successfull,
    NIL otherwise.

- [function] COPY-NAMED-READTABLE NAMED-READTABLE

    Like COPY-READTABLE but takes a NAMED-READTABLE-DESIGNATOR as argument.

- [function] LIST-ALL-NAMED-READTABLES 

    Returns a list of all registered readtables. The returned list is
    guaranteed to be fresh, but may contain duplicates.

- [type] NAMED-READTABLE-DESIGNATOR

    Either a symbol or a readtable itself.

- [condition] READER-MACRO-CONFLICT READTABLE-ERROR

    Continuable.
    
    This condition is signaled during the merge process if a reader
    macro (be it a macro character or the sub character of a dispatch
    macro character) is present in the both source and the target
    readtable and the two respective reader macro functions differ.

- [condition] READTABLE-DOES-ALREADY-EXIST READTABLE-ERROR

    Continuable.

- [condition] READTABLE-DOES-NOT-EXIST READTABLE-ERROR

* * *
###### \[generated by [MGL-PAX](https://github.com/melisgl/mgl-pax)\]


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 named-readtables

Maintainer

Gábor Melis

Author

Tobias C. Rittweiler <trittweiler@common-lisp.net>

Contact

mega@retes.hu

License

BSD, see LICENSE

Description

Library that creates a namespace for named readtable akin to the namespace of packages.

Version

0.9

Source

named-readtables.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 named-readtables.asd

Location

/home/quickbuilder/quicklisp/dists/quicklisp/software/named-readtables-20180131-git/named-readtables.asd

Systems

named-readtables (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 named-readtables/package.lisp

Parent

named-readtables (system)

Location

package.lisp

Packages

editor-hints.named-readtables


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.3 named-readtables/utils.lisp

Dependency

package.lisp (file)

Parent

named-readtables (system)

Location

utils.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.4 named-readtables/define-api.lisp

Dependency

utils.lisp (file)

Parent

named-readtables (system)

Location

define-api.lisp

Internal Definitions

define-api (macro)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.5 named-readtables/cruft.lisp

Dependency

define-api.lisp (file)

Parent

named-readtables (system)

Location

cruft.lisp

Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

3.1.6 named-readtables/named-readtables.lisp

Dependency

cruft.lisp (file)

Parent

named-readtables (system)

Location

named-readtables.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 editor-hints.named-readtables

See NAMED-READTABLES:@NAMED-READTABLES-MANUAL.

Source

package.lisp (file)

Nickname

named-readtables

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Macros

Macro: defreadtable NAME &body OPTIONS

Define a new named readtable, whose name is given by the symbol NAME. Or, if a readtable is already registered under that name, redefine that one.

The readtable can be populated using the following OPTIONS:

- ‘(:MERGE READTABLE-DESIGNATORS+)‘

Merge the readtables designated into the new readtable being defined as per MERGE-READTABLES-INTO.

If no :MERGE clause is given, an empty readtable is used. See MAKE-READTABLE.

- ‘(:FUSE READTABLE-DESIGNATORS+)‘

Like :MERGE except:

Error conditions of type READER-MACRO-CONFLICT that are signaled during the merge operation will be silently _continued_. It follows that reader macros in earlier entries will be overwritten by later ones. For backward compatibility, :FUZE is accepted as an alias of :FUSE.

- ‘(:DISPATCH-MACRO-CHAR MACRO-CHAR SUB-CHAR FUNCTION)‘

Define a new sub character ‘SUB-CHAR‘ for the dispatching macro character ‘MACRO-CHAR‘, per SET-DISPATCH-MACRO-CHARACTER. You probably have to define ‘MACRO-CHAR‘ as a dispatching macro character by the following option first.

- ‘(:MACRO-CHAR MACRO-CHAR FUNCTION [NON-TERMINATING-P])‘

Define a new macro character in the readtable, per SET-MACRO-CHARACTER. If ‘FUNCTION‘ is the keyword :DISPATCH, ‘MACRO-CHAR‘ is made a dispatching macro character, per MAKE-DISPATCH-MACRO-CHARACTER.

- ‘(:SYNTAX-FROM FROM-READTABLE-DESIGNATOR FROM-CHAR TO-CHAR)‘

Set the character syntax of TO-CHAR in the readtable being defined to the same syntax as FROM-CHAR as per SET-SYNTAX-FROM-CHAR.

- ‘(:CASE CASE-MODE)‘

Defines the _case sensitivity mode_ of the resulting readtable.

Any number of option clauses may appear. The options are grouped by their type, but in each group the order the options appeared textually is preserved. The following groups exist and are executed in the following order: :MERGE and :FUSE (one
group), :CASE, :MACRO-CHAR and :DISPATCH-MACRO-CHAR (one group), finally :SYNTAX-FROM.

Notes:

The readtable is defined at load-time. If you want to have it available at compilation time – say to use its reader-macros in the same file as its definition – you have to wrap the DEFREADTABLE form in an explicit EVAL-WHEN.

On redefinition, the target readtable is made empty first before it’s refilled according to the clauses.

NIL, :STANDARD, :COMMON-LISP, :MODERN, and :CURRENT are preregistered readtable names.

Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)

Macro: in-readtable NAME

Set *READTABLE* to the readtable referred to by the symbol NAME.

Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Compiler macros

Compiler Macro: ensure-readtable NAME &optional DEFAULT
Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)

Compiler Macro: register-readtable NAME READTABLE
Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Functions

Function: copy-named-readtable NAMED-READTABLE

Like COPY-READTABLE but takes a NAMED-READTABLE-DESIGNATOR as argument.

Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)

Function: ensure-readtable NAME &optional DEFAULT

Looks up the readtable specified by NAME and returns it if it’s found. If it is not found, it registers the readtable designated by DEFAULT under the name represented by NAME; or if no default argument is given, it signals an error of type READTABLE-DOES-NOT-EXIST instead.

Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)

Function: find-readtable NAME

Looks for the readtable specified by NAME and returns it if it is found. Returns NIL otherwise.

Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)

Setf Expander

(setf find-readtable) (setf expander)

Setf Expander: (setf find-readtable) NAME READTABLE
Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)

Reader

find-readtable (function)

Writer

register-readtable (function)

Function: list-all-named-readtables ()

Returns a list of all registered readtables. The returned list is guaranteed to be fresh, but may contain duplicates.

Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)

Function: make-readtable &optional NAME &key MERGE

Creates and returns a new readtable under the specified
NAME.

MERGE takes a list of NAMED-READTABLE-DESIGNATORS and specifies the readtables the new readtable is created from. (See the :MERGE clause of DEFREADTABLE for details.)

If MERGE is NIL, an empty readtable is used instead.

If NAME is not given, an anonymous empty readtable is returned.

Notes:

An empty readtable is a readtable where each character’s syntax is the same as in the _standard readtable_ except that each macro character has been made a constituent. Basically: whitespace stays whitespace, everything else is constituent.

Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)

Function: merge-readtables-into RESULT-READTABLE &rest NAMED-READTABLES

Copy the contents of each readtable in NAMED-READTABLES into RESULT-READTABLE.

If a macro character appears in more than one of the readtables, i.e. if a conflict is discovered during the merge, an error of type READER-MACRO-CONFLICT is signaled.

Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)

Function: readtable-name NAMED-READTABLE

Returns the name of the readtable designated by NAMED-READTABLE, or NIL.

Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)

Function: register-readtable NAME READTABLE

Associate READTABLE with NAME. Returns the readtable.

Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)

Setf Expander

(setf find-readtable) (setf expander)

Function: rename-readtable OLD-NAME NEW-NAME

Replaces the associated name of the readtable designated by OLD-NAME with NEW-NAME. If a readtable is already registered under NEW-NAME, an error of type READTABLE-DOES-ALREADY-EXIST is signaled.

Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)

Function: unregister-readtable NAMED-READTABLE

Remove the association of NAMED-READTABLE. Returns T if successfull, NIL otherwise.

Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.4 Conditions

Condition: reader-macro-conflict ()

Continuable.

This condition is signaled during the merge process if a reader macro (be it a macro character or the sub character of a dispatch macro character) is present in the both source and the target readtable and the two respective reader macro functions differ.

Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)

Direct superclasses

readtable-error (condition)

Direct methods
Direct slots
Slot: macro-char
Initargs

:macro-char

Initform

(quote (editor-hints.named-readtables::required-argument))

Readers

conflicting-macro-char (generic function)

Writers

(setf conflicting-macro-char) (generic function)

Slot: sub-char
Initargs

:sub-char

Initform

(quote nil)

Readers

conflicting-dispatch-sub-char (generic function)

Writers

(setf conflicting-dispatch-sub-char) (generic function)

Slot: from-readtable
Initargs

:from-readtable

Initform

(quote (editor-hints.named-readtables::required-argument))

Readers

from-readtable (generic function)

Writers

(setf from-readtable) (generic function)

Slot: to-readtable
Initargs

:to-readtable

Initform

(quote (editor-hints.named-readtables::required-argument))

Readers

to-readtable (generic function)

Writers

(setf to-readtable) (generic function)

Condition: readtable-does-already-exist ()

Continuable.

Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)

Direct superclasses

readtable-error (condition)

Direct methods
Direct slots
Slot: readtable-name
Initargs

:readtable-name

Initform

(quote (editor-hints.named-readtables::required-argument))

Readers

existing-readtable-name (generic function)

Writers

(setf existing-readtable-name) (generic function)

Condition: readtable-does-not-exist ()
Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)

Direct superclasses

readtable-error (condition)

Direct methods
Direct slots
Slot: readtable-name
Initargs

:readtable-name

Initform

(quote (editor-hints.named-readtables::required-argument))

Readers

missing-readtable-name (generic function)

Writers

(setf missing-readtable-name) (generic function)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.5 Types

Type: named-readtable-designator ()

Either a symbol or a readtable itself.

Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Special variables

Special Variable: *case-preserving-standard-readtable*
Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)

Special Variable: *empty-readtable*
Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)

Special Variable: *named-readtables*
Package

editor-hints.named-readtables

Source

cruft.lisp (file)

Special Variable: *readtable-names*
Package

editor-hints.named-readtables

Source

cruft.lisp (file)

Special Variable: *reserved-readtable-names*
Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)

Special Variable: *standard-readtable*
Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Macros

Macro: define-api NAME LAMBDA-LIST TYPE-LIST &body BODY
Package

editor-hints.named-readtables

Source

define-api.lisp (file)

Macro: define-cruft NAME LAMBDA-LIST &body DOCSTRING
Package

editor-hints.named-readtables

Source

cruft.lisp (file)

Macro: destructure-case VALUE &body PATTERNS

Dispatch VALUE to one of PATTERNS.
A cross between ‘case’ and ‘destructuring-bind’.
The pattern syntax is:
((HEAD . ARGS) . BODY)
The list of patterns is searched for a HEAD ‘eq’ to the car of VALUE. If one is found, the BODY is executed with ARGS bound to the corresponding values in the CDR of VALUE.

Package

editor-hints.named-readtables

Source

utils.lisp (file)

Macro: do-readtable (ENTRY-DESIGNATOR READTABLE &optional RESULT) &body BODY

Iterate through a readtable’s macro characters, and dispatch macro characters.

Package

editor-hints.named-readtables

Source

cruft.lisp (file)

Macro: with-readtable-iterator (NAME READTABLE) &body BODY
Package

editor-hints.named-readtables

Source

cruft.lisp (file)

Macro: without-package-lock (&rest PACKAGE-NAMES) &body BODY
Package

editor-hints.named-readtables

Source

utils.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Functions

Function: %associate-name-with-readtable NAME READTABLE

Associate NAME with READTABLE for FIND-READTABLE to work.

Package

editor-hints.named-readtables

Source

cruft.lisp (file)

Function: %associate-readtable-with-name NAME READTABLE

Associate READTABLE with NAME for READTABLE-NAME to work.

Package

editor-hints.named-readtables

Source

cruft.lisp (file)

Function: %clear-readtable READTABLE

Make all macro characters in READTABLE be constituents.

Package

editor-hints.named-readtables

Source

cruft.lisp (file)

Function: %find-readtable NAME

Return the readtable named NAME.

Package

editor-hints.named-readtables

Source

cruft.lisp (file)

Function: %frob-swank-readtable-alist PACKAGE READTABLE
Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)

Function: %get-dispatch-macro-character CHAR SUBCHAR RT

Ensure ANSI behaviour for GET-DISPATCH-MACRO-CHARACTER.

Package

editor-hints.named-readtables

Source

cruft.lisp (file)

Function: %get-macro-character CHAR RT

Ensure ANSI behaviour for GET-MACRO-CHARACTER.

Package

editor-hints.named-readtables

Source

cruft.lisp (file)

Function: %list-all-readtable-names ()

Return a list of all available readtable names.

Package

editor-hints.named-readtables

Source

cruft.lisp (file)

Function: %make-readtable-iterator READTABLE
Package

editor-hints.named-readtables

Source

cruft.lisp (file)

Function: %readtable-name READTABLE

Return the name associated with READTABLE.

Package

editor-hints.named-readtables

Source

cruft.lisp (file)

Function: %standard-readtable ()

Return the standard readtable.

Package

editor-hints.named-readtables

Source

cruft.lisp (file)

Function: %unassociate-name-from-readtable NAME READTABLE

Remove the association between NAME and READTABLE

Package

editor-hints.named-readtables

Source

cruft.lisp (file)

Function: %unassociate-readtable-from-name NAME READTABLE

Remove the association between READTABLE and NAME.

Package

editor-hints.named-readtables

Source

cruft.lisp (file)

Function: check-reader-macro-conflict FROM TO CHAR &optional SUBCHAR
Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)

Function: constant-standard-readtable-expression-p THING
Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)

Function: dispatch-macro-char-p CHAR RT

Is CHAR a dispatch macro character in RT?

Package

editor-hints.named-readtables

Source

cruft.lisp (file)

Function: ensure-dispatch-macro-character CHAR &optional NON-TERMINATING-P READTABLE
Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)

Function: ensure-function FUNCTION-DESIGNATOR

Returns the function designated by FUNCTION-DESIGNATOR:
if FUNCTION-DESIGNATOR is a function, it is returned, otherwise it must be a function name and its FDEFINITION is returned.

Package

editor-hints.named-readtables

Source

utils.lisp (file)

Function: ensure-list LIST

If LIST is a list, it is returned. Otherwise returns the list designated by LIST.

Package

editor-hints.named-readtables

Source

utils.lisp (file)

Function: find-reserved-readtable RESERVED-NAME
Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)

Function: function= FN1 FN2

Are reader-macro function-designators FN1 and FN2 the same?

Package

editor-hints.named-readtables

Source

cruft.lisp (file)

Function: parse-body BODY &key DOCUMENTATION WHOLE

Parses BODY into (values remaining-forms declarations doc-string). Documentation strings are recognized only if DOCUMENTATION is true. Syntax errors in body are signalled and WHOLE is used in the signal arguments when given.

Package

editor-hints.named-readtables

Source

utils.lisp (file)

Function: parse-ordinary-lambda-list LAMBDA-LIST

Parses an ordinary lambda-list, returning as multiple values:

1. Required parameters.
2. Optional parameter specifications, normalized into form (NAME INIT SUPPLIEDP)
where SUPPLIEDP is NIL if not present.
3. Name of the rest parameter, or NIL.
4. Keyword parameter specifications, normalized into form ((KEYWORD-NAME NAME) INIT SUPPLIEDP) where SUPPLIEDP is NIL if not present.
5. Boolean indicating &ALLOW-OTHER-KEYS presence.
6. &AUX parameter specifications, normalized into form (NAME INIT).

Signals a PROGRAM-ERROR is the lambda-list is malformed.

Package

editor-hints.named-readtables

Source

utils.lisp (file)

Function: required-argument &optional NAME

Signals an error for a missing argument of NAME. Intended for use as an initialization form for structure and class-slots, and a default value for required keyword arguments.

Package

editor-hints.named-readtables

Source

utils.lisp (file)

Function: reserved-readtable-name-p NAME
Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)

Function: signal-suspicious-registration-warning NAME-EXPR READTABLE-EXPR
Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)

Function: simple-program-error MESSAGE &rest ARGS
Package

editor-hints.named-readtables

Source

utils.lisp (file)

Function: simple-style-warn FORMAT-CONTROL &rest FORMAT-ARGS
Package

editor-hints.named-readtables

Source

utils.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.4 Generic functions

Generic Function: conflicting-dispatch-sub-char CONDITION
Generic Function: (setf conflicting-dispatch-sub-char) NEW-VALUE CONDITION
Package

editor-hints.named-readtables

Methods
Method: conflicting-dispatch-sub-char (CONDITION reader-macro-conflict)
Method: (setf conflicting-dispatch-sub-char) NEW-VALUE (CONDITION reader-macro-conflict)
Source

named-readtables.lisp (file)

Generic Function: conflicting-macro-char CONDITION
Generic Function: (setf conflicting-macro-char) NEW-VALUE CONDITION
Package

editor-hints.named-readtables

Methods
Method: conflicting-macro-char (CONDITION reader-macro-conflict)
Method: (setf conflicting-macro-char) NEW-VALUE (CONDITION reader-macro-conflict)
Source

named-readtables.lisp (file)

Generic Function: existing-readtable-name CONDITION
Generic Function: (setf existing-readtable-name) NEW-VALUE CONDITION
Package

editor-hints.named-readtables

Methods
Method: existing-readtable-name (CONDITION readtable-does-already-exist)
Method: (setf existing-readtable-name) NEW-VALUE (CONDITION readtable-does-already-exist)
Source

named-readtables.lisp (file)

Generic Function: from-readtable CONDITION
Generic Function: (setf from-readtable) NEW-VALUE CONDITION
Package

editor-hints.named-readtables

Methods
Method: from-readtable (CONDITION reader-macro-conflict)
Method: (setf from-readtable) NEW-VALUE (CONDITION reader-macro-conflict)
Source

named-readtables.lisp (file)

Generic Function: missing-readtable-name CONDITION
Generic Function: (setf missing-readtable-name) NEW-VALUE CONDITION
Package

editor-hints.named-readtables

Methods
Method: missing-readtable-name (CONDITION readtable-does-not-exist)
Method: (setf missing-readtable-name) NEW-VALUE (CONDITION readtable-does-not-exist)
Source

named-readtables.lisp (file)

Generic Function: to-readtable CONDITION
Generic Function: (setf to-readtable) NEW-VALUE CONDITION
Package

editor-hints.named-readtables

Methods
Method: to-readtable (CONDITION reader-macro-conflict)
Method: (setf to-readtable) NEW-VALUE (CONDITION reader-macro-conflict)
Source

named-readtables.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.5 Conditions

Condition: readtable-error ()
Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)

Direct superclasses

error (condition)

Direct subclasses
Condition: simple-program-error ()
Package

editor-hints.named-readtables

Source

utils.lisp (file)

Direct superclasses
  • program-error (condition)
  • simple-error (condition)
Condition: simple-style-warning ()
Package

editor-hints.named-readtables

Source

utils.lisp (file)

Direct superclasses
  • style-warning (condition)
  • simple-warning (condition)

Previous: , Up: Internal definitions   [Contents][Index]

5.2.6 Types

Type: readtable-designator ()
Package

editor-hints.named-readtables

Source

named-readtables.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   N  
Index Entry  Section

F
File, Lisp, named-readtables.asd: The named-readtables<dot>asd file
File, Lisp, named-readtables/cruft.lisp: The named-readtables/cruft<dot>lisp file
File, Lisp, named-readtables/define-api.lisp: The named-readtables/define-api<dot>lisp file
File, Lisp, named-readtables/named-readtables.lisp: The named-readtables/named-readtables<dot>lisp file
File, Lisp, named-readtables/package.lisp: The named-readtables/package<dot>lisp file
File, Lisp, named-readtables/utils.lisp: The named-readtables/utils<dot>lisp file

L
Lisp File, named-readtables.asd: The named-readtables<dot>asd file
Lisp File, named-readtables/cruft.lisp: The named-readtables/cruft<dot>lisp file
Lisp File, named-readtables/define-api.lisp: The named-readtables/define-api<dot>lisp file
Lisp File, named-readtables/named-readtables.lisp: The named-readtables/named-readtables<dot>lisp file
Lisp File, named-readtables/package.lisp: The named-readtables/package<dot>lisp file
Lisp File, named-readtables/utils.lisp: The named-readtables/utils<dot>lisp file

N
named-readtables.asd: The named-readtables<dot>asd file
named-readtables/cruft.lisp: The named-readtables/cruft<dot>lisp file
named-readtables/define-api.lisp: The named-readtables/define-api<dot>lisp file
named-readtables/named-readtables.lisp: The named-readtables/named-readtables<dot>lisp file
named-readtables/package.lisp: The named-readtables/package<dot>lisp file
named-readtables/utils.lisp: The named-readtables/utils<dot>lisp file

Jump to:   F   L   N  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   %   (  
C   D   E   F   G   I   L   M   P   R   S   T   U   W  
Index Entry  Section

%
%associate-name-with-readtable: Internal functions
%associate-readtable-with-name: Internal functions
%clear-readtable: Internal functions
%find-readtable: Internal functions
%frob-swank-readtable-alist: Internal functions
%get-dispatch-macro-character: Internal functions
%get-macro-character: Internal functions
%list-all-readtable-names: Internal functions
%make-readtable-iterator: Internal functions
%readtable-name: Internal functions
%standard-readtable: Internal functions
%unassociate-name-from-readtable: Internal functions
%unassociate-readtable-from-name: Internal functions

(
(setf conflicting-dispatch-sub-char): Internal generic functions
(setf conflicting-dispatch-sub-char): Internal generic functions
(setf conflicting-macro-char): Internal generic functions
(setf conflicting-macro-char): Internal generic functions
(setf existing-readtable-name): Internal generic functions
(setf existing-readtable-name): Internal generic functions
(setf find-readtable): Exported functions
(setf from-readtable): Internal generic functions
(setf from-readtable): Internal generic functions
(setf missing-readtable-name): Internal generic functions
(setf missing-readtable-name): Internal generic functions
(setf to-readtable): Internal generic functions
(setf to-readtable): Internal generic functions

C
check-reader-macro-conflict: Internal functions
Compiler Macro, ensure-readtable: Exported compiler macros
Compiler Macro, register-readtable: Exported compiler macros
conflicting-dispatch-sub-char: Internal generic functions
conflicting-dispatch-sub-char: Internal generic functions
conflicting-macro-char: Internal generic functions
conflicting-macro-char: Internal generic functions
constant-standard-readtable-expression-p: Internal functions
copy-named-readtable: Exported functions

D
define-api: Internal macros
define-cruft: Internal macros
defreadtable: Exported macros
destructure-case: Internal macros
dispatch-macro-char-p: Internal functions
do-readtable: Internal macros

E
ensure-dispatch-macro-character: Internal functions
ensure-function: Internal functions
ensure-list: Internal functions
ensure-readtable: Exported compiler macros
ensure-readtable: Exported functions
existing-readtable-name: Internal generic functions
existing-readtable-name: Internal generic functions

F
find-readtable: Exported functions
find-reserved-readtable: Internal functions
from-readtable: Internal generic functions
from-readtable: Internal generic functions
Function, %associate-name-with-readtable: Internal functions
Function, %associate-readtable-with-name: Internal functions
Function, %clear-readtable: Internal functions
Function, %find-readtable: Internal functions
Function, %frob-swank-readtable-alist: Internal functions
Function, %get-dispatch-macro-character: Internal functions
Function, %get-macro-character: Internal functions
Function, %list-all-readtable-names: Internal functions
Function, %make-readtable-iterator: Internal functions
Function, %readtable-name: Internal functions
Function, %standard-readtable: Internal functions
Function, %unassociate-name-from-readtable: Internal functions
Function, %unassociate-readtable-from-name: Internal functions
Function, check-reader-macro-conflict: Internal functions
Function, constant-standard-readtable-expression-p: Internal functions
Function, copy-named-readtable: Exported functions
Function, dispatch-macro-char-p: Internal functions
Function, ensure-dispatch-macro-character: Internal functions
Function, ensure-function: Internal functions
Function, ensure-list: Internal functions
Function, ensure-readtable: Exported functions
Function, find-readtable: Exported functions
Function, find-reserved-readtable: Internal functions
Function, function=: Internal functions
Function, list-all-named-readtables: Exported functions
Function, make-readtable: Exported functions
Function, merge-readtables-into: Exported functions
Function, parse-body: Internal functions
Function, parse-ordinary-lambda-list: Internal functions
Function, readtable-name: Exported functions
Function, register-readtable: Exported functions
Function, rename-readtable: Exported functions
Function, required-argument: Internal functions
Function, reserved-readtable-name-p: Internal functions
Function, signal-suspicious-registration-warning: Internal functions
Function, simple-program-error: Internal functions
Function, simple-style-warn: Internal functions
Function, unregister-readtable: Exported functions
function=: Internal functions

G
Generic Function, (setf conflicting-dispatch-sub-char): Internal generic functions
Generic Function, (setf conflicting-macro-char): Internal generic functions
Generic Function, (setf existing-readtable-name): Internal generic functions
Generic Function, (setf from-readtable): Internal generic functions
Generic Function, (setf missing-readtable-name): Internal generic functions
Generic Function, (setf to-readtable): Internal generic functions
Generic Function, conflicting-dispatch-sub-char: Internal generic functions
Generic Function, conflicting-macro-char: Internal generic functions
Generic Function, existing-readtable-name: Internal generic functions
Generic Function, from-readtable: Internal generic functions
Generic Function, missing-readtable-name: Internal generic functions
Generic Function, to-readtable: Internal generic functions

I
in-readtable: Exported macros

L
list-all-named-readtables: Exported functions

M
Macro, define-api: Internal macros
Macro, define-cruft: Internal macros
Macro, defreadtable: Exported macros
Macro, destructure-case: Internal macros
Macro, do-readtable: Internal macros
Macro, in-readtable: Exported macros
Macro, with-readtable-iterator: Internal macros
Macro, without-package-lock: Internal macros
make-readtable: Exported functions
merge-readtables-into: Exported functions
Method, (setf conflicting-dispatch-sub-char): Internal generic functions
Method, (setf conflicting-macro-char): Internal generic functions
Method, (setf existing-readtable-name): Internal generic functions
Method, (setf from-readtable): Internal generic functions
Method, (setf missing-readtable-name): Internal generic functions
Method, (setf to-readtable): Internal generic functions
Method, conflicting-dispatch-sub-char: Internal generic functions
Method, conflicting-macro-char: Internal generic functions
Method, existing-readtable-name: Internal generic functions
Method, from-readtable: Internal generic functions
Method, missing-readtable-name: Internal generic functions
Method, to-readtable: Internal generic functions
missing-readtable-name: Internal generic functions
missing-readtable-name: Internal generic functions

P
parse-body: Internal functions
parse-ordinary-lambda-list: Internal functions

R
readtable-name: Exported functions
register-readtable: Exported compiler macros
register-readtable: Exported functions
rename-readtable: Exported functions
required-argument: Internal functions
reserved-readtable-name-p: Internal functions

S
Setf Expander, (setf find-readtable): Exported functions
signal-suspicious-registration-warning: Internal functions
simple-program-error: Internal functions
simple-style-warn: Internal functions

T
to-readtable: Internal generic functions
to-readtable: Internal generic functions

U
unregister-readtable: Exported functions

W
with-readtable-iterator: Internal macros
without-package-lock: Internal macros

Jump to:   %   (  
C   D   E   F   G   I   L   M   P   R   S   T   U   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
F   M   R   S   T  
Index Entry  Section

*
*case-preserving-standard-readtable*: Internal special variables
*empty-readtable*: Internal special variables
*named-readtables*: Internal special variables
*readtable-names*: Internal special variables
*reserved-readtable-names*: Internal special variables
*standard-readtable*: Internal special variables

F
from-readtable: Exported conditions

M
macro-char: Exported conditions

R
readtable-name: Exported conditions
readtable-name: Exported conditions

S
Slot, from-readtable: Exported conditions
Slot, macro-char: Exported conditions
Slot, readtable-name: Exported conditions
Slot, readtable-name: Exported conditions
Slot, sub-char: Exported conditions
Slot, to-readtable: Exported conditions
Special Variable, *case-preserving-standard-readtable*: Internal special variables
Special Variable, *empty-readtable*: Internal special variables
Special Variable, *named-readtables*: Internal special variables
Special Variable, *readtable-names*: Internal special variables
Special Variable, *reserved-readtable-names*: Internal special variables
Special Variable, *standard-readtable*: Internal special variables
sub-char: Exported conditions

T
to-readtable: Exported conditions

Jump to:   *  
F   M   R   S   T  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   E   N   P   R   S   T  
Index Entry  Section

C
Condition, reader-macro-conflict: Exported conditions
Condition, readtable-does-already-exist: Exported conditions
Condition, readtable-does-not-exist: Exported conditions
Condition, readtable-error: Internal conditions
Condition, simple-program-error: Internal conditions
Condition, simple-style-warning: Internal conditions

E
editor-hints.named-readtables: The editor-hints<dot>named-readtables package

N
named-readtable-designator: Exported types
named-readtables: The named-readtables system

P
Package, editor-hints.named-readtables: The editor-hints<dot>named-readtables package

R
reader-macro-conflict: Exported conditions
readtable-designator: Internal types
readtable-does-already-exist: Exported conditions
readtable-does-not-exist: Exported conditions
readtable-error: Internal conditions

S
simple-program-error: Internal conditions
simple-style-warning: Internal conditions
System, named-readtables: The named-readtables system

T
Type, named-readtable-designator: Exported types
Type, readtable-designator: Internal types

Jump to:   C   E   N   P   R   S   T