Quickutilβ

Lisp utilities on demand

Fork me on GitHub
search

There are 8 utilities.

coerce-to-condition v1.0

This function implements the semantics of CL condition designators. It makes a condition, given a datum (which may be a symbol, format control, or condition) and a list of arguments args. See CLHS 9.1.2.1 for more specifics.

default-type is the type of objects that should be constructed when datum is a format control.

supertype is a type that should be a supertype of the types of all conditions returned by this function.

Provides
coerce-to-condition
Source Code
 
required-argument v1.0

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.

Provides
required-argument
Source Code
 
simple-style-warning v1.0
Provides
simple-style-warning
Source Code
 
simple-reader-error v1.0
Provides
simple-reader-error
Source Code
 
simple-parse-error v1.0
Provides
simple-parse-error
Source Code
 
simple-program-error v1.0
Provides
simple-program-error
Source Code
 
ignore-some-conditions v1.0

Similar to cl:ignore-errors but the (unevaluated) conditions list determines which specific conditions are to be ignored.

Provides
ignore-some-conditions
Source Code
 
unwind-protect-case v1.0

Like cl:unwind-protect, but you can specify the circumstances that the cleanup clauses are run.

clauses ::= (:NORMAL form*)* | (:ABORT form*)* | (:ALWAYS form*)* 

Clauses can be given in any order, and more than one clause can be given for each circumstance. The clauses whose denoted circumstance occured, are executed in the order the clauses appear.

abort-flag is the name of a variable that will be bound to t in clauses if the protected-form aborted preemptively, and to nil otherwise.

Examples:

(unwind-protect-case ()  
     (protected-form)  
   (:normal (format t "This is only evaluated if PROTECTED-FORM executed normally.~%"))  
   (:abort  (format t "This is only evaluated if PROTECTED-FORM aborted preemptively.~%"))  
   (:always (format t "This is evaluated in either case.~%")))  
 
(unwind-protect-case (aborted-p)  
     (protected-form)  
   (:always (perform-cleanup-if aborted-p))) 
Provides
unwind-protect-case
Source Code