Permalink
Browse files

Initarg names don't need to be keywords

Fix definitions of defstruct, define-condition, signal, warn, error,
cerror, and assert.
Thanks to Fengjing Xiao for the bug report.
  • Loading branch information...
trebb committed Feb 5, 2018
1 parent 10ee6a7 commit 00bbf094e067b300ba12b15331c402a0763e148a
Showing with 36 additions and 38 deletions.
  1. +33 −33 clqr-conditions-and-errors.tex
  2. +3 −5 clqr-structures.tex
@@ -26,7 +26,7 @@ \section{Conditions and Errors}
\Goos{\kwd{:accessor} \VAR{accessor}} \\
\kwd{:allocation } \xorGOO{\kwd{:instance}\\
\kwd{:class}}{\}}\DF{\kwd{:instance}}\\
- \Goos{\kwd{:initarg} \kwd{:}\VAR{initarg-name}}\\
+ \Goos{\kwd{:initarg} \Op{\kwd{:}}\VAR{initarg-name}}\\
\kwd{:initform} \VAR{ form}\\
\kwd{:type} \VAR{ type}\\
\kwd{:documentation} \VAR{ slot-doc}%
@@ -38,7 +38,7 @@ \section{Conditions and Errors}
{
Define, as a subtype of \VAR{parent-type}s, condition type
\retval{\VAR{foo}}. In a new condition, a \VAR{slot}'s value
- defaults to \VAR{form} unless set via \kwd{:}\VAR{initarg-name};
+ defaults to \VAR{form} unless set via \Op{\kwd{:}}\VAR{initarg-name};
it is readable via (\VAR{reader} \VAR{i}) or (\VAR{accessor}
\VAR{i}), and writable via (\VAR{writer} \VAR{value} \VAR{i}) or
(\kwd{setf} (\VAR{accessor} \VAR{i}) \VAR{value}). With
@@ -48,9 +48,9 @@ \section{Conditions and Errors}
}
\IT{(\FU*{MAKE-CONDITION}
- \VAR{condition-type} \Goos{\kwd{:}\VAR{initarg-name} \VAR{value}})}
+ \VAR{condition-type} \Goos{\Op{\kwd{:}}\VAR{initarg-name} \VAR{value}})}
{
- Return new \retval{instance of \VAR{condition-type}}.
+ Return new \retval{instance of \VAR{condition-type}}.
}
\IT{(\xorGOO{%
@@ -60,7 +60,7 @@ \section{Conditions and Errors}
}{\}}
\xorGOO{%
\VAR{condition}\\
- \VAR{condition-type}\text{ } \Goos{\kwd{:}\VAR{initarg-name} \VAR{value}}\\
+ \VAR{condition-type}\text{ } \Goos{\Op{\kwd{:}}\VAR{initarg-name} \VAR{value}}\\
\VAR{control}\text{ } \OPn{\VAR{arg}}%
}{\}})}
{
@@ -76,7 +76,7 @@ \section{Conditions and Errors}
\IT{(\FU*{CERROR} \VAR{continue-control}
\xorGOO{%
\VAR{condition}\text{ } \OPn{\VAR{continue-arg}}\\
- \VAR{condition-type}\text{ } \Goos{\kwd{:}\VAR{initarg-name} \VAR{value}}\\
+ \VAR{condition-type}\text{ } \Goos{\Op{\kwd{:}}\VAR{initarg-name} \VAR{value}}\\
\VAR{control}\text{ } \OPn{\VAR{arg}}%
}{\}})}
{
@@ -90,21 +90,21 @@ \section{Conditions and Errors}
\IT{(\MC*{IGNORE-ERRORS} \PROGN{\VAR{form}})}
{
- Return \retval{values of \VAR{form}s} or, in case of \kwd{error}s,
- \retval{\NIL} and the \retvalii{condition}.
+ Return \retval{values of \VAR{form}s} or, in case of \kwd{error}s,
+ \retval{\NIL} and the \retvalii{condition}.
}
\IT{(\FU*{INVOKE-DEBUGGER} \VAR{condition})}
{
- Invoke debugger with \VAR{condition}.
+ Invoke debugger with \VAR{condition}.
}
\IT{(\MC*{ASSERT} \VAR{test} \OP{(\OPn{\VAR{place}})
\Op{%
\xorGOO{%
\VAR{condition}\text{ } \OPn{\VAR{continue-arg}}\\
\VAR{condition-type}\text{ }
- \Goos{\kwd{:}\VAR{initarg-name} \VAR{value}}\\
+ \Goos{\Op{\kwd{:}}\VAR{initarg-name} \VAR{value}}\\
\VAR{control}\text{ } \OPn{\VAR{arg}}}{\}}}})}
{
If \VAR{test}, which may depend on \VAR{place}s, returns \NIL,
@@ -226,7 +226,7 @@ \section{Conditions and Errors}
\IT{(\FU*{RESTART-NAME} \VAR{restart})}
{
- \retval{Name of \VAR{restart}}.
+ \retval{Name of \VAR{restart}}.
}
\IT{(\xorGOO{\FU*{ABORT}\\
@@ -235,76 +235,76 @@ \section{Conditions and Errors}
\FU*{STORE-VALUE} \VAR{ value}\\
\FU*{USE-VALUE} \VAR{ value}}{\}} \Op{\VAR{condition}\DF{\NIL}})}
{
- Transfer control to innermost applicable restart with same name
- (i.e. \kwd{abort}, \ldots, \kwd{continue} \ldots) out of those either associated
- with \VAR{condition} or un-associated at all; or, without
- \VAR{condition}, out of all restarts. If no restart is found,
- signal \kwd{control-error} for \FU{abort} and \FU{muffle-warning},
- or return \retval{\NIL} for the rest.
+ Transfer control to innermost applicable restart with same name
+ (i.e. \kwd{abort}, \ldots, \kwd{continue} \ldots) out of those either associated
+ with \VAR{condition} or un-associated at all; or, without
+ \VAR{condition}, out of all restarts. If no restart is found,
+ signal \kwd{control-error} for \FU{abort} and \FU{muffle-warning},
+ or return \retval{\NIL} for the rest.
}
\IT{(\MC*{WITH-CONDITION-RESTARTS} \VAR{condition}
\VAR{restarts} \PROGN{\VAR{form}})}
{
- Evaluate \VAR{form}s with \VAR{restarts}
- dynamically associated with \VAR{condition}. Return \retval{values
- of \VAR{form}s}.
+ Evaluate \VAR{form}s with \VAR{restarts}
+ dynamically associated with \VAR{condition}. Return \retval{values
+ of \VAR{form}s}.
}
\IT{\arrGOO{(\FU*{ARITHMETIC-ERROR-OPERATION} \VAR{ condition})\\
(\FU*{ARITHMETIC-ERROR-OPERANDS} \VAR{ condition})}{.}}
{
- \retval{List of function} or \retval{of its operands} respectively,
- used in the operation which caused \VAR{condition}.
+ \retval{List of function} or \retval{of its operands} respectively,
+ used in the operation which caused \VAR{condition}.
}
\IT{(\FU*{CELL-ERROR-NAME} \VAR{condition})}
{
- \retval{Name of cell} which caused \VAR{condition}.
+ \retval{Name of cell} which caused \VAR{condition}.
}
\IT{(\FU*{UNBOUND-SLOT-INSTANCE} \VAR{condition})}
{
- \retval{Instance} with unbound slot which caused \VAR{condition}.
+ \retval{Instance} with unbound slot which caused \VAR{condition}.
}
\IT{(\FU*{PRINT-NOT-READABLE-OBJECT} \VAR{condition})}
{
- The \retval{object} not readably printable under \VAR{condition}.
+ The \retval{object} not readably printable under \VAR{condition}.
}
\IT{\arrGOO{%
(\FU*{PACKAGE-ERROR-PACKAGE } \VAR{condition})\\
(\FU*{FILE-ERROR-PATHNAME } \VAR{condition})\\
(\FU*{STREAM-ERROR-STREAM } \VAR{condition})}{.}}
{
- \retval{Package}, \retval{path}, or \retval{stream}, respectively,
- which caused the \VAR{condition} of indicated type.
+ \retval{Package}, \retval{path}, or \retval{stream}, respectively,
+ which caused the \VAR{condition} of indicated type.
}
\IT{\arrGOO{(\FU*{TYPE-ERROR-DATUM} \VAR{ condition})\\
(\FU*{TYPE-ERROR-EXPECTED-TYPE} \VAR{ condition})}{.}}
{
- \retval{Object} which caused \VAR{condition} of type \kwd{type-error}, or its
- \retval{expected type}, respectively.
+ \retval{Object} which caused \VAR{condition} of type \kwd{type-error}, or its
+ \retval{expected type}, respectively.
}
\IT{\arrGOO{(\FU*{SIMPLE-CONDITION-FORMAT-CONTROL} \VAR{ condition})\\
(\FU*{SIMPLE-CONDITION-FORMAT-ARGUMENTS} \VAR{ condition})}{.}}
{
- Return \retval{\FU{format} control} or list of \retval{\FU{format}
- arguments}, respectively, of \VAR{condition}.
+ Return \retval{\FU{format} control} or list of \retval{\FU{format}
+ arguments}, respectively, of \VAR{condition}.
}
\IT{\V{\A break-on-signals\A}\DF{\NIL}}
{\index{*BREAK-ON-SIGNALS*@\A BREAK-ON-SIGNALS\A}
- Condition type debugger is to be invoked on.
+ Condition type debugger is to be invoked on.
}
\IT{\V{\A debugger-hook\A}\DF{\NIL}}
{\index{*DEBUGGER-HOOK*@\A DEBUGGER-HOOK\A}
Function of condition and
- function itself. Called before debugger.
+ function itself. Called before debugger.
}
\end{LIST}
View
@@ -40,15 +40,13 @@ \section{Structures}
(\kwd{:type } \xorGOO{\kwd{list}\\
\kwd{vector}\\
(\kwd{vector }\NEV{\VAR{type}})}{\}})\text{ }
- \orGOO{%
- \kwd{:named}\\
- (\kwd{:initial-offset } \NEV{\VAR{n}})\\
- }{.}\\
+ \Op{(\kwd{:initial-offset } \NEV{\VAR{n}})}\\
\xorGOO{
(\kwd{:print-object } \Op{\NEV{\VAR{o-printer}}})\\
(\kwd{:print-function } \Op{\NEV{\VAR{f-printer}}})
}{.}
}{.}\\
+ \kwd{:named}\\
\xorGOO{%
\kwd{:predicate}\\
(\kwd{:predicate } \Op{\NEV{\VAR{p-name}}\DF{\VAR{foo}\LIT{-P}}})}{.}
@@ -85,7 +83,7 @@ \section{Structures}
\VAR{bar} \VAR{stream} \VAR{print-level}), respectively.
If \kwd{:type} without \kwd{:named} is given, no \VAR{foo}\LIT{-P}
is created.
-}
+ }
\IT{(\FU*{COPY-STRUCTURE} \VAR{structure})}
{

0 comments on commit 00bbf09

Please sign in to comment.